[PATCH] D53789: [hwasan] optionally right-align heap allocations
Kostya Serebryany via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 2 16:00:45 PDT 2018
kcc added a comment.
Atomic operations on aarch64 require alignment, so this approach will break whenever the code does something like
struct Foo{
AtomiWord a; // used by atomic instructions
char vla[0];
}
all other loads/stores seem to work (see "https://reviews.llvm.org/B2.5.2 Alignment of data accesses" in https://static.docs.arm.com/ddi0487/da/DDI0487D_a_armv8_arm.pdf)
so far I've found one such place (std::string implementation in libstdc++, which uses a ref counting string).
I've also tried several benchmarks from fuzzer-test-suite with hwasan and right-alignment.
Those that don't use std::string just work, so I think we still have a chance to get away with this on aarch64,
although we may require some code modifications to avoid the situation above.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D53789
More information about the llvm-commits
mailing list