{"action":"created","issue":{"url":"https://api.github.com/repos/google/sanitizers/issues/769","repository_url":"https://api.github.com/repos/google/sanitizers","labels_url":"https://api.github.com/repos/google/sanitizers/issues/769/labels{/name}","comments_url":"https://api.github.com/repos/google/sanitizers/issues/769/comments","events_url":"https://api.github.com/repos/google/sanitizers/issues/769/events","html_url":"https://github.com/google/sanitizers/issues/769","id":207461946,"number":769,"title":"None of the sanitizers work in Clang 3.9.1","user":{"login":"tony2001","id":42386,"avatar_url":"https://avatars.githubusercontent.com/u/42386?v=3","gravatar_id":"","url":"https://api.github.com/users/tony2001","html_url":"https://github.com/tony2001","followers_url":"https://api.github.com/users/tony2001/followers","following_url":"https://api.github.com/users/tony2001/following{/other_user}","gists_url":"https://api.github.com/users/tony2001/gists{/gist_id}","starred_url":"https://api.github.com/users/tony2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tony2001/subscriptions","organizations_url":"https://api.github.com/users/tony2001/orgs","repos_url":"https://api.github.com/users/tony2001/repos","events_url":"https://api.github.com/users/tony2001/events{/privacy}","received_events_url":"https://api.github.com/users/tony2001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-14T09:32:50Z","updated_at":"2017-02-14T13:52:17Z","closed_at":null,"body":"I get the following errors when trying to use any of the sanitizers:\r\n\r\n```\r\n# /home/tony/clang/bin/clang -fsanitize=address -o foo foo.c\r\n/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../x86_64-suse-linux/bin/ld: cannot find /home/tony/clang/bin/../lib/clang/3.9.1/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory\r\nclang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)\r\n\r\n# /home/tony/clang/bin/clang -fsanitize=memory -o foo foo.c\r\n/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../x86_64-suse-linux/bin/ld: cannot find /home/tony/clang/bin/../lib/clang/3.9.1/lib/linux/libclang_rt.msan-x86_64.a: No such file or directory\r\nclang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)\r\n\r\n# /home/tony/clang/bin/clang -fsanitize=undefined -o foo foo.c\r\n/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../x86_64-suse-linux/bin/ld: cannot find /home/tony/clang/bin/../lib/clang/3.9.1/lib/linux/libclang_rt.ubsan_standalone-x86_64.a: No such file or directory\r\nclang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)\r\n```\r\n\r\nClang/LLVM version: 3.9.1\r\nOS: SUSE Linux Enterprise Server 11 SP3 x86-64\r\nCompiler used to build Clang: gcc-6.3.0\r\n\r\nHow to reproduce:\r\n```\r\n# wget http://releases.llvm.org/3.9.1/cfe-3.9.1.src.tar.xz\r\n# wget http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz\r\n# tar -xJf llvm-3.9.1.src.tar.xz\r\n# tar -xJf cfe-3.9.1.src.tar.xz\r\n# mv cfe-3.9.1.src llvm-3.9.1.src/tools/clang\r\n# mkdir llvm-3.9.1.src/build\r\n# cd llvm-3.9.1.src/build\r\n# cmake -DCMAKE_INSTALL_PREFIX=/home/tony/clang -DCMAKE_BUILD_TYPE=MinSizeRel ..\r\n# make install\r\n```\r\n\r\nI saw many similar bug reports, but all of them were related to autotools build and were fixed several years ago. The current build doesn't even mention autotools anymore, yet the problem still persists.\r\nAny idea what I'm doing wrong?\r\n"},"comment":{"url":"https://api.github.com/repos/google/sanitizers/issues/comments/279712111","html_url":"https://github.com/google/sanitizers/issues/769#issuecomment-279712111","issue_url":"https://api.github.com/repos/google/sanitizers/issues/769","id":279712111,"user":{"login":"tony2001","id":42386,"avatar_url":"https://avatars.githubusercontent.com/u/42386?v=3","gravatar_id":"","url":"https://api.github.com/users/tony2001","html_url":"https://github.com/tony2001","followers_url":"https://api.github.com/users/tony2001/followers","following_url":"https://api.github.com/users/tony2001/following{/other_user}","gists_url":"https://api.github.com/users/tony2001/gists{/gist_id}","starred_url":"https://api.github.com/users/tony2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tony2001/subscriptions","organizations_url":"https://api.github.com/users/tony2001/orgs","repos_url":"https://api.github.com/users/tony2001/repos","events_url":"https://api.github.com/users/tony2001/events{/privacy}","received_events_url":"https://api.github.com/users/tony2001/received_events","type":"User","site_admin":false},"created_at":"2017-02-14T13:52:17Z","updated_at":"2017-02-14T13:52:17Z","body":"Thank you. That helped indeed.\r\nUnfortunately, ASAN crashes right after the start:\r\n```\r\nASAN:DEADLYSIGNAL\r\n=================================================================\r\n==5074==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7ffff00e4db2 bp 0x7f0000b000010000 sp 0x7fffffff1630 T0)\r\n==5074==The signal is caused by a READ memory access.\r\n==5074==Hint: address points to the zero page.\r\n   #0 0x7ffff00e4db1  (/lib64/libc.so.6+0x7adb1)\"\r\n    #1 0x7ffff00e810b  (/lib64/libc.so.6+0x7e10b)\"\r\n    #2 0x7fffcc5d4e88  (/lib64/libnss_dns.so.2+0x2e88)\"\r\n    #3 0x7ffff013180a  (/lib64/libc.so.6+0xc780a)\"\r\n    #4 0x7ffff0134645  (/lib64/libc.so.6+0xca645)\r\n\r\n```\r\n\r\nIt looks like free() in a shared library (libcurl in this case) causes it:\r\n```\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n0x00007ffff00e4db2 in _int_free () from /lib64/libc.so.6\r\n(gdb) bt\r\n#0  0x00007ffff00e4db2 in _int_free () from /lib64/libc.so.6\r\n#1  0x00007ffff00e810c in free () from /lib64/libc.so.6\r\n#2  0x00007fffcc470e89 in _nss_dns_gethostbyname4_r () from /lib64/libnss_dns.so.2\r\n#3  0x00007ffff013180b in gaih_inet () from /lib64/libc.so.6\r\n#4  0x00007ffff0134646 in getaddrinfo () from /lib64/libc.so.6\r\n#5  0x000000000056d797 in __interceptor_getaddrinfo (node=0x6120007ec940 \"ip2geo.d3\", service=0x7fffffff3170 \"80\", hints=0x7fffffff3190, out=0x7fffffff3088)\r\n    at /home/tony/llvm-3.9.1.src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:2169\r\n#6  0x00007ffff384dd30 in Curl_getaddrinfo_ex () from /local/lib/php7/lib/libcurl.so.4\r\n#7  0x00007ffff3848051 in Curl_getaddrinfo () from /local/lib/php7/lib/libcurl.so.4\r\n#8  0x00007ffff3809025 in Curl_resolv () from /local/lib/php7/lib/libcurl.so.4\r\n#9  0x00007ffff380930b in Curl_resolv_timeout () from /local/lib/php7/lib/libcurl.so.4\r\n#10 0x00007ffff382cb97 in resolve_server () from /local/lib/php7/lib/libcurl.so.4\r\n#11 0x00007ffff382dfb3 in create_conn () from /local/lib/php7/lib/libcurl.so.4\r\n#12 0x00007ffff382e232 in Curl_connect () from /local/lib/php7/lib/libcurl.so.4\r\n#13 0x00007ffff3842672 in multi_runsingle () from /local/lib/php7/lib/libcurl.so.4\r\n#14 0x00007ffff3843b7d in curl_multi_perform () from /local/lib/php7/lib/libcurl.so.4\r\n#15 0x00007ffff38395b7 in easy_transfer () from /local/lib/php7/lib/libcurl.so.4\r\n#16 0x00007ffff3839785 in easy_perform () from /local/lib/php7/lib/libcurl.so.4\r\n#17 0x00007ffff38397d6 in curl_easy_perform () from /local/lib/php7/lib/libcurl.so.4\r\n```\r\n\r\nAny idea what could be wrong this time?"}}
{"actor":{"display_login":"tony2001"}}