[PATCH] D29586: [lsan] Enable LSan for arm Linux
Evgeniy Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 13:33:41 PDT 2017
eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.
LGTM with the aligned(16) change
================
Comment at: test/lsan/TestCases/swapcontext.cc:28
int main(int argc, char *argv[]) {
- char stack_memory[kStackSize + 1];
+ char stack_memory[kStackSize + 1] __attribute__((aligned(4)));
char *heap_memory = new char[kStackSize + 1];
----------------
m.ostapenko wrote:
> eugenis wrote:
> > should it not be 16 for x86_64?
> Yeah, x86_64 needs 16 here (not sure why did this work on my x86_64 box, perhaps my machine we OK with unaligned access).
This only matters for some sse instructions which can appear out of thin air, like an inlined memcpy of a stack-allocated buffer. I guess it did not happen in you case. Still, better be safe.
Repository:
rL LLVM
https://reviews.llvm.org/D29586
More information about the llvm-commits
mailing list