Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Add debug-only checks to expose all use-after-frees #2

Open
jonas-schievink opened this issue Jan 12, 2019 · 0 comments
Open

Add debug-only checks to expose all use-after-frees #2

jonas-schievink opened this issue Jan 12, 2019 · 0 comments

Comments

@jonas-schievink
Copy link
Owner

With cfg(debug_assertions) or, since this is extremely expensive, only when a Cargo feature is enabled, we should perform a full collection every time a reference to a GC object is dropped.

This means that objects get freed as soon as the GC would be allowed to, which should expose all possible use-after-free bugs caused either by a bug in rcgc, missing roots, or incorrectly broken/moved object references.

@jonas-schievink jonas-schievink changed the title Add debug-only checks expose all use-after-frees Add debug-only checks to expose all use-after-frees Jan 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant