Repository navigation
Fall back to [[clang::no_sanitize("hwaddress")]] for HWASan on Clang < 21. - #1932
Draft
copybara-service[bot] wants to merge 1 commit into
Draft
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
…< 21.
Clang added the `[[gnu::no_sanitize(...)]]` spelling in Clang 21, while supporting `[[clang::no_sanitize(...)]]` in earlier releases. Without checking `clang::no_sanitize`, Clang 20 and earlier fall back to GNU `__attribute__((no_sanitize("hwaddress")))` for `ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS` under HWASan, which fails to compile when stacked before `[[clang::no_sanitize_memory]]` on a class member function.
Also move `ABSL_ATTRIBUTE_NOINLINE` after `ABSL_ATTRIBUTE_NO_SANITIZE_*` in `stacktrace_aarch64-inl.inc` (matching `stacktrace_x86-inl.inc`) so C++11 `[[...]]` attributes precede GNU `__attribute__((noinline))`.
PiperOrigin-RevId: 1023287149
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fall back to [[clang::no_sanitize("hwaddress")]] for HWASan on Clang < 21.
Clang added the
[[gnu::no_sanitize(...)]]spelling in Clang 21, while supporting[[clang::no_sanitize(...)]]in earlier releases. Without checkingclang::no_sanitize, Clang 20 and earlier fall back to GNU__attribute__((no_sanitize("hwaddress")))forABSL_ATTRIBUTE_NO_SANITIZE_ADDRESSunder HWASan, which fails to compile when stacked before[[clang::no_sanitize_memory]]on a class member function.Also move
ABSL_ATTRIBUTE_NOINLINEafterABSL_ATTRIBUTE_NO_SANITIZE_*instacktrace_aarch64-inl.inc(matchingstacktrace_x86-inl.inc) so C++11[[...]]attributes precede GNU__attribute__((noinline)).