Comment #3 on issue 361 by [email protected]: CHECK failed (assert()
tls + stack) on Linux in 32bit threaded
https://code.google.com/p/address-sanitizer/issues/detail?id=361
Thanks for your answer.
Here you go (with clang 3.5.1 225002):
1. Verbose output symbolized (so it's also 2.)
==3725==Parsed ASAN_OPTIONS: verbosity=2
==3725==AddressSanitizer: failed to intercept '__isoc99_printf'
==3725==AddressSanitizer: failed to intercept '__isoc99_sprintf'
==3725==AddressSanitizer: failed to intercept '__isoc99_snprintf'
==3725==AddressSanitizer: failed to intercept '__isoc99_fprintf'
==3725==AddressSanitizer: failed to intercept '__isoc99_vprintf'
==3725==AddressSanitizer: failed to intercept '__isoc99_vsprintf'
==3725==AddressSanitizer: failed to intercept '__isoc99_vsnprintf'
==3725==AddressSanitizer: failed to intercept '__isoc99_vfprintf'
==3725==AddressSanitizer: libc interceptors initialized
|| `[0x40000000, 0xffffffff]` || HighMem ||
|| `[0x28000000, 0x3fffffff]` || HighShadow ||
|| `[0x24000000, 0x27ffffff]` || ShadowGap ||
|| `[0x20000000, 0x23ffffff]` || LowShadow ||
|| `[0x00000000, 0x1fffffff]` || LowMem ||
MemToShadow(shadow): 0x24000000 0x247fffff 0x25000000 0x27ffffff
redzone=16
max_redzone=2048
quarantine_size=64M
malloc_context_size=30
SHADOW_SCALE: 3
SHADOW_GRANULARITY: 8
SHADOW_OFFSET: 20000000
==3725==Installed the sigaction for signal 11
==3725==SetCurrentThread: 0xf770e000 for thread 0xf753b6f0
==3725==T0: stack [0xff6c0000,0xffec0000) size 0x800000; local=0xffebdaec
==3725==AddressSanitizer Init done
==3725==SetCurrentThread: 0xf770e078 for thread 0xf5fffb70
==3725==AddressSanitizer CHECK failed:
/tmp/ABC/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc:433 "((*tls_addr
+ *tls_size)) <= ((*stk_addr + *stk_size))" (0xf6000030, 0xf6000000)
#0 0x80f2b86 in __asan::AsanCheckFailed(char const*, int, char const*,
unsigned long long, unsigned long long)
/tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_rtl.cc:70
#1 0x80f83bc in __sanitizer::CheckFailed(char const*, int, char const*,
unsigned long long, unsigned long long)
/tmp/ABC/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_common.cc:76
#2 0x8108ef6 in __sanitizer::GetThreadStackAndTls(bool, unsigned long*,
unsigned long*, unsigned long*, unsigned long*)
/tmp/ABC/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc:433
#3 0x80f57d4 in __asan::AsanThread::SetThreadStackAndTls()
/tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_thread.cc:187
#4 0x80f57d4 in __asan::AsanThread::Init()
/tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_thread.cc:146
#5 0x80f5ac9 in __asan::AsanThread::ThreadStart(unsigned long)
/tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_thread.cc:159
#6 0x807a8c2 in asan_thread_start(void*)
/tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:170
#7 0xf76e1953 in start_thread
(/lib/i386-linux-gnu/libpthread.so.0+0x5953)
3. Stacktrace with gdb
0xf75f329c in nanosleep () from /lib/i386-linux-gnu/libc.so.6
(gdb) bt
#0 0xf75f329c in nanosleep () from /lib/i386-linux-gnu/libc.so.6
#1 0xf75f30c2 in sleep () from /lib/i386-linux-gnu/libc.so.6
#2 0x0810c3ff in main ()
(gdb) info threads
Id Target Id Frame
2 Thread 0xf5fffb70 (LWP 3814) "a.out" 0xf75f329c in nanosleep ()
from /lib/i386-linux-gnu/libc.so.6
* 1 Thread 0xf75526f0 (LWP 3813) "a.out" 0xf75f329c in nanosleep ()
from /lib/i386-linux-gnu/libc.so.6
(gdb) thread 2
[Switching to thread 2 (Thread 0xf5fffb70 (LWP 3814))]
#0 0xf75f329c in nanosleep () from /lib/i386-linux-gnu/libc.so.6
(gdb) bt
#0 0xf75f329c in nanosleep () from /lib/i386-linux-gnu/libc.so.6
#1 0xf75f30c2 in sleep () from /lib/i386-linux-gnu/libc.so.6
#2 0x0810958b in __sanitizer::SleepForSeconds (seconds=100)
at
/tmp/ABC/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc:72
#3 0x080f3450 in __asan::AsanDie ()
at /tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_rtl.cc:46
#4 0x080f832b in __sanitizer::Die ()
at
/tmp/ABC/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_common.cc:63
#5 0x080f2c24 in __asan::AsanCheckFailed (
file=0x811a70c "/tmp/ABC/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc",
line=433,
cond=0x811a874 "((*tls_addr + *tls_size)) <= ((*stk_addr + *stk_size))",
v1=4127195184, v2=4127195136)
at /tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_rtl.cc:71
#6 0x080f83bd in __sanitizer::CheckFailed (
file=0x811a70c "/tmp/ABC/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc",
line=433,
cond=0x811a874 "((*tls_addr + *tls_size)) <= ((*stk_addr + *stk_size))",
v1=4127195184, v2=4127195136)
at
/tmp/ABC/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_common.cc:76
#7 0x08108ef7 in __sanitizer::GetThreadStackAndTls (main=false,
stk_addr=0xf7387010, stk_size=0xf7387014, tls_addr=0xf7387018,
tls_size=0xf5fff2e8)
at
/tmp/ABC/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc:433
#8 0x080f57d5 in SetThreadStackAndTls (this=0xf7387000)
at /tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_thread.cc:187
#9 __asan::AsanThread::Init (this=this@entry=0xf7387000)
at /tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_thread.cc:146
#10 0x080f5aca in __asan::AsanThread::ThreadStart (this=0xf7387000,
os_id=3814)
at /tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_thread.cc:159
#11 0x0807a8c3 in asan_thread_start (arg=0xf7387000)
at /tmp/ABC/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:170
#12 0xf76f8954 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#13 0xf762895e in clone () from /lib/i386-linux-gnu/libc.so.6
On a side note even though it's specified to sleep for 100 seconds, I had
to increase the sleep() time in the test_thread.c code otherwise it exited
after the specified sleep time in the code (so after 1 second).
Thanks again for your help.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.