[llvm] [hwasan] Allow stack traces even when fixed shadow is used (PR #109344)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 15:49:53 PDT 2024
================
@@ -1897,16 +1898,16 @@ void HWAddressSanitizer::ShadowMapping::init(Triple &TargetTriple,
InTls = false;
Offset = 0;
WithFrameRecord = true;
- } else if (ClMappingOffset.getNumOccurrences() > 0) {
- InGlobal = false;
- InTls = false;
- Offset = ClMappingOffset;
- WithFrameRecord = false;
} else if (ClEnableKhwasan || InstrumentWithCalls) {
InGlobal = false;
InTls = false;
- Offset = 0;
+ Offset = optOr<uint64_t>(ClMappingOffset, (uint64_t)0);
----------------
fmayer wrote:
Why is this necessary? ClMappingOffset is opt<uint64_t> so I don't understand why we need the explicit specialization.
Also please don't use C-style casts.
https://github.com/llvm/llvm-project/pull/109344
More information about the llvm-commits
mailing list