Closed ramosian-glider closed 9 years ago
Hi!
This doesn't reproduce for me:
$ cat realign.cc
#include <stdlib.h>
int main(int argc, char const* argv[])
{
void* a = alloca(atoi(argv[1]));
return 0;
}
$ ../bin/clang++ -fsanitize=address realign.cc
$ ./a.out 10
However, I use OS X 10.8.2 (Darwin 12.2.0) and the latest Clang built from trunk (LLVM
revision 169652). Could you check if your test case works on the newest Clang (http://clang.llvm.org/get_started.html)?
Reported by samsonov@google.com
on 2012-12-09 23:34:23
Also, please try -mllvm -asan-realign-stack=0 and let us know if it helps.
Reported by konstantin.s.serebryany
on 2012-12-10 04:59:46
"-mllvm -asan-realign-stack=0" does not make any difference on my version of clang.
It working in trunk for you is encouraging then. I may not have the patience to test
this with trunk anytime soon though. My code did build with trunk from 6 months ago
or so though.
Reported by arvid.norberg
on 2012-12-15 04:16:13
Stack realignment in presence of dynamic allocas is supported by LLVM/Clang starting
from r158087 (with significant fixes in later patches). Hopefully this would work for
you in LLVM 3.2 and in the next Apple clang release.
Reported by samsonov@google.com
on 2012-12-17 06:47:35
Invalid
Adding Project:AddressSanitizer as part of GitHub migration.
Reported by ramosian.glider
on 2015-07-30 09:13:40
Originally reported on Google Code with ID 132
Reported by
arvid.norberg
on 2012-12-09 20:11:39