Skip to content

Conversation

@qinsoon
Copy link
Member

@qinsoon qinsoon commented Oct 29, 2025

See mmtk/mmtk-core#1410. For types like (true, ()), the length of the object is 9 bytes (including a 8-byte header). So the field () is 0-size at the end of the object, and an internal pointer to it actually points outside the allocated memory for this object. In such case, MMTk does not consider it as an internal pointer.

One example is https://github.com/mmtk/julia/blob/10c2bb0a05530e0c0fdca9b04d8321440267216c/src/staticdata.c#L1766 where the runtime iterates through all the fields and slot can point to a () field at the end of an object. MMTk core does not consider it as an internal pointer, as it points to the memory outside the object. If we intend to use address based hashing for htables, the above code needs to find the base object for slot and find the stored hash for the base object. It is necessary for MMTk to correctly consider it as an internal pointer, and be able to find the base object.

@qinsoon qinsoon force-pushed the test-object-end-internal-pointer branch from 9159fa1 to 60fac26 Compare October 30, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant