[LLVMdev] So I just did a normal 'ninja check' with a CMake build that enables ASan and the go bindings tests are... busted...

Chandler Carruth chandlerc at google.com
Sun Nov 2 01:08:22 PST 2014


After sending SIGKILL to the linker (it crossed 10 minutes without showing
signs of progress) I get this in the error logs for the go test:

FAIL: LLVM :: Bindings/Go/go.test (11793 of 11793)
******************** TEST 'LLVM :: Bindings/Go/go.test' FAILED
********************
Script:
--
/usr/local/google/home/chandlerc/src/llvm/build/./bin/llvm-go test
llvm.org/llvm/bindings/go/llvm
--
Exit Code: 1

Command Output (stdout):
--
FAIL    llvm.org/llvm/bindings/go/llvm [build failed]

--
Command Output (stderr):
--
# llvm.org/llvm/bindings/go/llvm
../include/llvm/ExecutionEngine/MCJIT.h:0: error: undefined reference to
'__asan_before_dynamic_init'
../include/llvm/ExecutionEngine/MCJIT.h:0: error: undefined reference to
'__asan_after_dynamic_init'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:45: error: undefined reference to
'__asan_option_detect_stack_use_after_return'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:45: error: undefined reference to
'__asan_stack_malloc_1'
/home/chandlerc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.x-google/../../../../include/c++/4.9.x-google/bits/unique_ptr.h:0:
error: undefined reference to '__asan_option_detect_stack_us
e_after_return'
/home/chandlerc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.x-google/../../../../include/c++/4.9.x-google/bits/unique_ptr.h:0:
error: undefined reference to '__asan_stack_malloc_0'
/home/chandlerc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.x-google/../../../../include/c++/4.9.x-google/bits/unique_ptr.h:206:
error: undefined reference to '__asan_report_store8'
/home/chandlerc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.x-google/../../../../include/c++/4.9.x-google/bits/unique_ptr.h:0:
error: undefined reference to '__asan_option_detect_stack_us
e_after_return'
/home/chandlerc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.x-google/../../../../include/c++/4.9.x-google/bits/unique_ptr.h:0:
error: undefined reference to '__asan_stack_malloc_0'
/home/chandlerc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.x-google/../../../../include/c++/4.9.x-google/bits/unique_ptr.h:206:
error: undefined reference to '__asan_report_store8'
../include/llvm/ExecutionEngine/SectionMemoryManager.h:42: error: undefined
reference to '__asan_report_store8'
/home/chandlerc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.x-google/../../../../include/c++/4.9.x-google/bits/unique_ptr.h:235:
error: undefined reference to '__asan_report_load8'
/home/chandlerc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.x-google/../../../../include/c++/4.9.x-google/bits/unique_ptr.h:237:
error: undefined reference to '__asan_report_store8'
/home/chandlerc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.x-google/../../../../include/c++/4.9.x-google/bits/unique_ptr.h:235:
error: undefined reference to '__asan_report_load8'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:0: error: undefined reference to
'__asan_option_detect_stack_use_after_return'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:0: error: undefined reference to
'__asan_stack_malloc_1'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:76: error: undefined reference to
'__asan_report_load8'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:76: error: undefined reference to
'__asan_report_load8'
../include/llvm/ADT/SmallVector.h:138: error: undefined reference to
'__asan_handle_no_return'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:0: error: undefined reference to
'__asan_stack_malloc_0'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:0: error: undefined reference to
'__asan_stack_malloc_1'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:0: error: undefined reference to
'__asan_stack_malloc_1'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:0: error: undefined reference to
'__asan_stack_malloc_0'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:104: error: undefined reference to
'__asan_handle_no_return'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:0: error: undefined reference to
'__asan_stack_malloc_2'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:0: error: undefined reference to
'__asan_stack_malloc_2'
../lib/ExecutionEngine/MCJIT/MCJIT.cpp:147: error: undefined reference to
'__asan_handle_no_return'
<snip>
../lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:541: error:
undefined reference to '__asan_stack_free_5'
/home/chandlerc/src/llvm/build/lib/libLLVMRuntimeDyld.a(RuntimeDyldChecker.cpp.o):../lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:function
asan.module_ctor: error: undefined ref
erence to '__asan_init_v4'
/home/chandlerc/src/llvm/build/lib/libLLVMRuntimeDyld.a(RuntimeDyldChecker.cpp.o):../lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:function
asan.module_ctor: error: undefined ref
erence to '__asan_register_globals'
/home/chandlerc/src/llvm/build/lib/libLLVMRuntimeDyld.a(RuntimeDyldChecker.cpp.o):../lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:function
asan.module_dtor: error: undefined ref
erence to '__asan_unregister_globals'
/home/chandlerc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.x-google/../../../../include/c++/4.9.x-google/bits/stl_pair.h:281:
error: undefined reference to '__asan_report_load2'
../include/llvm/Support/Endian.h:53: error: undefined reference to
'__asan_report_load_n'
<snip>
clang-3.5: error: unable to execute command: Terminated
clang-3.5: error: linker command failed due to signal (use -v to see
invocation)

Seems like all of this is caused by the executable not getting linked with
-fsanitize=address which might be fixable by catching when ASan is enabled
in CMake and passing those flags down to the variables used in the
environment when running the go tests.... But I'm worried that might not
fix the slow link?


On Sun, Nov 2, 2014 at 1:02 AM, Chandler Carruth <chandlerc at google.com>
wrote:

> Specifically, the test is causing a link to occur for CGO stuff. It has
> been running 8 minutes now with Gold, and is producing a 400mb .o file
> afaict:
>
> % du -hs /tmp/go-build703430446/
> llvm.org/llvm/bindings/go/llvm/_test/_obj_test/_cgo_.o
> 397M    /tmp/go-build703430446/
> llvm.org/llvm/bindings/go/llvm/_test/_obj_test/_cgo_.o
>
> What am I doing wrong here?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141102/47dc3102/attachment.html>


More information about the llvm-dev mailing list