Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 361 by jon34056...@gmail.com: CHECK failed (assert() tls + stack)
on Linux in 32bit threaded
https://code.google.com/p/address-sanitizer/issues/detail?id=361
What steps will reproduce the problem?
1. Build clang+compiler-rt 3.5
2. Use it with attached test file to produce a 32-bit binary multi-threaded
3. AddressSanitizer CHECK failed (sanitizer_linux_libcdep.cc:433)
What is the expected output? What do you see instead?
$ clang -m32 -fsanitize=address test_thread.c -DTHREAD_USE
The program should launch and print the function name instead :
$ ./a.out
==19661==AddressSanitizer CHECK failed:
/tmp/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc:433 "((*tls_addr
+ *tls_size)) <= ((*stk_addr + *stk_size))" (0xf638f030, 0xf638f000)
#0 0x80da2ad (/tmp/a.out+0x80da2ad)
#1 0x80de75f (/tmp/a.out+0x80de75f)
#2 0x80ed8f7 (/tmp/a.out+0x80ed8f7)
#3 0x80dbe61 (/tmp/a.out+0x80dbe61)
#4 0x80dc1f2 (/tmp/a.out+0x80dc1f2)
#5 0x80b4afd (/tmp/a.out+0x80b4afd)
#6 0xf76f8953 (/lib/i386-linux-gnu/libpthread.so.0+0x5953)
But in 32-bit without thread it works :
$ clang -m32 -fsanitize=address test_thread.c
$ ./a.out
threadfunc
And in 64-bit it works in every case :
clang -m64 -fsanitize=address test_thread.c -DTHREAD_USE
clang -m64 -fsanitize=address test_thread.c
What version of the product are you using? On what operating system?
Clang 3.5 (also tested on 3.4 same result)
Host for compiling the test and running it :
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.2 (wheezy)
Release: 7.2
Codename: wheezy
Please provide any additional information below.
I used another system to build clang+asan :
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.10 (squeeze)
Release: 6.0.10
Codename: squeeze
But even if I build the test file on this machine the resulting binary
doesn't work on 'wheezy'
I also tried changing the stack value (ulimit (-H/-S) -s) without success.
Informations from the libc (in case that would be helpful) :
/lib/i386-linux-gnu/libc-2.13.so
GNU C Library (Debian EGLIBC 2.13-38) stable release version 2.13, by
Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.7.
Compiled on a Linux 3.2.35 system on 2012-12-30.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
Attachments:
test_thread.c 318 bytes
--
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 address-sanitizer+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.