-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[safety] Don't allow a root to be used with a frozen collector.
Also update `unfreeze` to properly wait until a collection is over. This is incorrect in the face of compacting collectors, since the collector might want to rewrite pointers while the mutator is actively using them (via the "frozen" context). Any parents using `safepoint_recurse` are fine. Their roots will still be relocated by the collector. I was actually tipped off by the fact by the fact the collector wants an `&mut` reference to all the roots in the shadow stack. Its impossible for the frozen collector to have a mutable reference while the mutator is still using it!!! The original &mut reference we were passing to `freeze_safepoint` was only valid for the initial safepoint. The collector can't assume that its valid to mutate (or even access) for any longer than that. The old implementation was invalid even though it wasn't a moving collection. However the bug only got triggered with optimization enabled :p We'll have to implement GC Handles as a replacement: #9
- Loading branch information
Showing
4 changed files
with
62 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters