-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[ASan][ADT] Don't scribble with ASan #79066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -317,8 +317,10 @@ template <typename ReturnT, typename... ParamTs> class UniqueFunctionBase { | |
// Clear the old callback and inline flag to get back to as-if-null. | ||
RHS.CallbackAndInlineFlag = {}; | ||
|
||
#ifndef NDEBUG | ||
// In debug builds, we also scribble across the rest of the storage. | ||
#if !defined(NDEBUG) && !defined(LLVM_ADDRESS_SANITIZER_BUILD) | ||
// In debug builds without ASan, we also scribble across the rest of the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit, I'd reword the second sentence to say There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fixed the text to be more precise. Thx! |
||
// storage. AddressSanitizer (ASAN) disables scribbling to prevent | ||
// overwriting poisoned objects (e.g., annotated short strings). | ||
memset(RHS.getInlineStorage(), 0xAD, InlineStorageSize); | ||
#endif | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.