-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
As suggested in Google's Safer usage of C++:
[…] nullifying pointers after free (by compiler). After delete foo->bar, add foo->bar = nullptr. Obviously, it’ll fix a small portion of cases (guesstimate: 1% – 10%); e.g. it can't handle delete GetBar();. But it’s ~ zero overhead and relatively easy to implement. LLVM patches have been floating around (but IDK the current state).”
Benefits: Detect 1 – 10% of UAFs. Improved developer ergonomics (modulo aliasing, the contents of a region after free and before it is reused are now defined).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels