Re: [PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-04 Thread Matt Gingell via cfe-commits
Hi Richard, Thanks for your analysis. This patch is intended to mitigate use-after-free bugs. In that context a “define strict behavior for invalid pointer values” we could deploy in production code would be very useful. Maybe calling this a sanitizer is misleading, and instead it could be pr

[PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-03 Thread Matt Gingell via cfe-commits
gingell created this revision. gingell added reviewers: cfe-commits, kcc. This patch adds a "value-after-delete" sanitizer, which will invalidate the value of a pointer passed in a delete expression. For instance, when -fsanitize=value-after-delete is passed: int *foo = new int; delete foo; // f