Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow dereferencing a rooted Gc during collection
Ordinarily, objects dropped during collections would only contain unrooted Gc pointers. But with `#[unsafe_ignore_trace]` it’s possible to smuggle a rooted Gc pointer into the heap. When we collect a rooted Gc pointer, we need to dereference it in order to unroot its contents. This should be safe because the associated allocation cannot have been collected while the Gc is rooted. Fixes an “assertion failed: finalizer_safe()” panic in the included test case (refs #52). Signed-off-by: Anders Kaseorg <[email protected]>
- Loading branch information