Closed GoogleCodeExporter 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)?
Original comment by samso...@google.com
on 9 Dec 2012 at 11:34
Also, please try -mllvm -asan-realign-stack=0 and let us know if it helps.
Original comment by konstant...@gmail.com
on 10 Dec 2012 at 4:59
"-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.
Original comment by arvid.no...@gmail.com
on 15 Dec 2012 at 4:16
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.
Original comment by samso...@google.com
on 17 Dec 2012 at 6:47
Original issue reported on code.google.com by
arvid.no...@gmail.com
on 9 Dec 2012 at 8:11