Skip to content
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

Incorrect class pointer check in concurrent marker #53

Closed
wenyuzhao opened this issue Jan 24, 2023 · 0 comments
Closed

Incorrect class pointer check in concurrent marker #53

wenyuzhao opened this issue Jan 24, 2023 · 0 comments

Comments

@wenyuzhao
Copy link
Owner

This class pointer check is incorrect:

debug_assert!(object.class_is_valid::<VM>());

Concurrent marker may visit a dead object which is already killed by RC decrements. RC dec processing will mark this object right before it is killed to ensure the concurrent marker will never scan these objects. Allocators can reuse this memory at anytime after the object is killed.

At the time concurrent marker visits these objects, they should be ignored since they're already marked.

Since their memory can be reused, their class pointers can be invalid. So the class pointer checks should never apply to these objects.

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

No branches or pull requests

1 participant