[PATCH] D39471: [asan] Fix small X86_64 ShadowOffset for non-default shadow scale
Kostya Serebryany via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 15 14:30:25 PST 2017
kcc added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:524
else
- Mapping.Offset = kSmallX86_64ShadowOffset;
+ Mapping.Offset = 0x7FFFFFFF & (0xFFFFF000 << Mapping.Scale);
} else if (IsWindows && IsX86_64) {
----------------
vitalybuka wrote:
> UB of shifting into sign bit?
> 0xFFFFF000ULL?
> Same above.
Please don't use constants in the code.
https://reviews.llvm.org/D39471
More information about the llvm-commits
mailing list