Skip to content

Fix bugs related to Reference.discovered #323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2025

Conversation

wks
Copy link
Contributor

@wks wks commented Aug 18, 2025

Previously the object scanner does not scan this field when reference processing is enabled, causing all nodes after the head node of any linked lists of Reference instances linked by the discovered field to be treat as garbage. We fix this by treating the discovered field as a strong field.

Another bug is related to the deduplication procedure in mmtk_enqueue_references. The code intended to handle adjacent duplicated element, but was wrong. That bug was benign and the worst it could do is making the last node temporarily point to itself before re-assigned the proper pointer.

Previously the object scanner does not scan this field when reference
processing is enabled, causing all nodes after the head node of any
linked lists of `Reference` instances linked by the `discovered` field
to be treat as garbage.  We fix this by treating the `discovered` field
as a strong field.

Another bug is related to the deduplication procedure in
`mmtk_enqueue_references`.  The code intended to handle adjacent
duplicated element, but was wrong.  That bug was beingn and the worst it
could do is making the last node temporarily point to itself before
re-assigned the proper pointer.
@wks wks requested a review from qinsoon August 18, 2025 13:58
Copy link
Member

@qinsoon qinsoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the fix.

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.

2 participants