FS#59361 - [clang] address sanitizer initialization crashes for 32-bit-binaries
Attached to Project:
Arch Linux
Opened by Heiko Eißfeldt (hexcoder) - Monday, 16 July 2018, 21:07 GMT
Last edited by Evangelos Foutras (foutrelis) - Friday, 20 July 2018, 15:08 GMT
Opened by Heiko Eißfeldt (hexcoder) - Monday, 16 July 2018, 21:07 GMT
Last edited by Evangelos Foutras (foutrelis) - Friday, 20 July 2018, 15:08 GMT
|
Details
Description:
clang-6.0.1 with address sanitizer does not produce correct initialization code for 32-bit-Binaries. When compiling int main() { return (0); } with 'clang -m32 -fsanitize=address' no errors are given. But running the program gives a SIGSEGV during initialization of the address sanitizer runtime lib before main() is reached. AddressSanitizer:DEADLYSIGNAL ================================================================= [1m[31m==5964==ERROR: AddressSanitizer: SEGV on unknown address 0xf7f5b020 (pc 0xf7f5b034 bp 0xffbb1f0c sp 0xffbb1ecc T16777215) [1m[0m==5964==The signal is caused by a WRITE memory access. #0 0xf7f5b033 in _dl_get_tls_static_info (/lib/ld-linux.so.2+0x12033) #1 0x56722e5b in __sanitizer::InitTlsSize() (/home/heiko/conftest+0x117e5b) #2 0x56705f72 in __asan::AsanInitInternal() [clone .part.3] (/home/heiko/conftest+0xfaf72) #3 0xf7f58a57 in _dl_init (/lib/ld-linux.so.2+0xfa57) #4 0xf7f49c99 (/lib/ld-linux.so.2+0xc99) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/lib/ld-linux.so.2+0x12033) in _dl_get_tls_static_info ==5964==ABORTING The packages (clang-6.0.1, lib32-clang) seem to be intact (according to pacman -Qkk). Additional info: Under Ubuntu 16.04 using clang 6.0.0 with ASAN for 32-bit-bianries, there is no problem. Steps to reproduce: 1. compile and link a minimal c program with "clang -m32 -fsanitize=address" 2. run the program see attached script |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Friday, 20 July 2018, 15:08 GMT
Reason for closing: Fixed
Additional comments about closing: compiler-rt 6.0.1-2
Friday, 20 July 2018, 15:08 GMT
Reason for closing: Fixed
Additional comments about closing: compiler-rt 6.0.1-2