[compiler-rt] r221882 - [asan] Switch to AsanInitFromRtl in .preinit_array.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Fri Nov 14 01:23:36 PST 2014


Ouch. The idea here was that preinit initializer is not one "from
instrumented code", and as such it's not supposed to trigger
activation. As the commit message mentions, this was already the case
due to the initialization order, but the code did not make it clear
enough. I'll revert.

On Thu, Nov 13, 2014 at 6:50 PM, Yury Gribov <y.gribov at samsung.com> wrote:
> On 11/13/2014 12:50 PM, Evgeniy Stepanov wrote:
>>
>> Author: eugenis
>> Date: Thu Nov 13 03:50:56 2014
>> New Revision: 221882
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=221882&view=rev
>> Log:
>> [asan] Switch to AsanInitFromRtl in .preinit_array.
>>
>> There is no functionality change due to a check in AsanActivate.
>
>
> This broke ASan DSO (cmake -DCOMPILER_RT_BUILD_SHARED_ASAN=ON):
> /home/ygribov/build/llvm/bin/../lib/clang/3.6.0/lib/linux/libclang_rt.asan-preinit-x86_64.a(asan_preinit.cc.o):(.preinit_array+0x0):
> undefined reference to `__asan::AsanInitFromRtl()'
> /home/ygribov/build/llvm/bin/../lib/clang/3.6.0/lib/linux/libclang_rt.asan-preinit-x86_64.a(asan_preinit.cc.o):(.preinit_array+0x0):
> undefined reference to `__asan::AsanInitFromRtl()'
> clang-3.6: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[3]: ***
> [projects/compiler-rt/lib/asan/tests/CMakeFiles/Asan-x86_64-with-calls-Dynamic-Test]
> Error 1
> [ 94%] make[2]: ***
> [projects/compiler-rt/lib/asan/tests/CMakeFiles/Asan-x86_64-with-calls-Dynamic-Test.dir/all]
> Error 2
> make[2]: *** Waiting for unfinished jobs....
> Built target Sanitizer-i386-Test
>
>



More information about the llvm-commits mailing list