Displaying 1 result from an estimated 1 matches for "__asan_init_".
Did you mean:
__asan_init
2014 Jul 03
5
[LLVMdev] Global constructors "get lost" when transforming bitcode files
...ess -o sum sum.o
This doesn't work:
clang -fsanitize=address -flto -c -o sum.o sum.c
llvm-dis sum.o
llvm-as sum.o.ll -o sum.o
clang -fsanitize=address -o sum sum.o
The second version segfaults when accessing shadow memory, because the
memory has not been initialized, because __asan_init_* was never called.
This is surprising, because in the llvm-disassembly the global constructor
still shows up.
The llvm-dis/llvm-as operation should be a no-op, yet the global_ctors get
lost in the process. This happens also with other operations that affect
global_ctors, e.g., with "opt -inse...