FS#29983 - [clang] package does not contain address sanitizer libraries
Attached to Project:
Arch Linux
Opened by Bjørn Øivind Bjørnsen (MrKaKe) - Wednesday, 23 May 2012, 07:12 GMT
Last edited by Evangelos Foutras (foutrelis) - Wednesday, 23 May 2012, 19:30 GMT
Opened by Bjørn Øivind Bjørnsen (MrKaKe) - Wednesday, 23 May 2012, 07:12 GMT
Last edited by Evangelos Foutras (foutrelis) - Wednesday, 23 May 2012, 19:30 GMT
|
Details
Description:
clang-3.1-1 does not seem to have been built/packaged with the address sanitizer (http://clang.llvm.org/docs/AddressSanitizer.html) libraries. These are useful for finding memory related bugs. Additional info: * package version(s) clang-3.1-1 llvm-3.1-1 * config and/or log files etc. None. Steps to reproduce: How to build a simple binary to check for asan-support: [bo@archawesome asan-build (master) Wed 08:58 ]$ cat test.cpp #include <iostream> int main(int argc, char **argv) { #if defined(__has_feature) && __has_feature(address_sanitizer) std::cout << "We have asan support." << std::endl; #else std::cout << "We do not have asan support." << std::endl; #endif return 0; } [bo@archawesome asan-build (master) Wed 09:02 ]$ clang++ -O2 -faddress-sanitizer test.cpp -o foo /usr/bin/ld.gold: error: cannot open /usr/bin/../lib/clang/3.1/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory /tmp/test-rTvb4s.o:test.cpp:function main: error: undefined reference to '__asan_report_load8' /tmp/test-rTvb4s.o:test.cpp:function main: error: undefined reference to '__asan_handle_no_return' /tmp/test-rTvb4s.o:test.cpp:function main: error: undefined reference to '__asan_report_load1' /tmp/test-rTvb4s.o:test.cpp:function main: error: undefined reference to '__asan_report_load1' /tmp/test-rTvb4s.o:test.cpp:function main: error: undefined reference to '__asan_report_load8' /tmp/test-rTvb4s.o:test.cpp:function main: error: undefined reference to '__asan_report_load8' /tmp/test-rTvb4s.o:test.cpp:function asan.module_ctor: error: undefined reference to '__asan_init' /tmp/test-rTvb4s.o:test.cpp:function asan.module_ctor: error: undefined reference to '__asan_register_globals' /tmp/test-rTvb4s.o:test.cpp:function asan.module_dtor: error: undefined reference to '__asan_unregister_globals' clang: error: linker command failed with exit code 1 (use -v to see invocation) /usr/lib/clang/3.1/lib does not exist. |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Wednesday, 23 May 2012, 19:30 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in clang 3.1-2.
Wednesday, 23 May 2012, 19:30 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in clang 3.1-2.