-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[UBSan] Move type:*=sanitize handling. #142006
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 all 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 |
---|---|---|
|
@@ -34,7 +34,11 @@ bool NoSanitizeList::containsGlobal(SanitizerMask Mask, StringRef GlobalName, | |
|
||
bool NoSanitizeList::containsType(SanitizerMask Mask, StringRef MangledTypeName, | ||
StringRef Category) const { | ||
return SSCL->inSection(Mask, "type", MangledTypeName, Category); | ||
auto NoSan = SSCL->inSectionBlame(Mask, "type", MangledTypeName, Category); | ||
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. maybe this code pattern can be extracted into private helper and used across other prefixes. 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. Yeah, I had the same thought when I copied the code from "containsType" to "containsFile". I am going to publish a followup PR to address the issue. |
||
if (NoSan == llvm::SpecialCaseList::NotFound) | ||
return false; | ||
auto San = SSCL->inSectionBlame(Mask, "type", MangledTypeName, "sanitize"); | ||
qinkunbao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return San == llvm::SpecialCaseList::NotFound || NoSan > San; | ||
qinkunbao marked this conversation as resolved.
Show resolved
Hide resolved
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. PR looks good to me. Only quirk is 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. |
||
} | ||
|
||
bool NoSanitizeList::containsFunction(SanitizerMask Mask, | ||
|
Uh oh!
There was an error while loading. Please reload this page.