[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] tcc segmentation fault with thread local storage?
From: |
Taisuke Yamada |
Subject: |
[Tinycc-devel] tcc segmentation fault with thread local storage? |
Date: |
Thu, 07 Sep 2006 13:42:18 +0900 |
User-agent: |
Thunderbird 1.5.0.5 (Windows/20060719) |
Hi.
I found tcc segfaults when trying to "-run" pthread-based
C script on Debian (sid, i386) platform, but can compile and
generate correct executable. Following is an example of such
script:
#!/usr/bin/tcc -run -lpthread
int main() { return 0; }
It does not matter what code you have in a script - it's what
you link that seems to matter. In above case, it's libpthread
that triggers SEGV error (in __pthread_initialize_minimal).
After some investigation, the cause was TLS (Thread Local Storage)
feature enabled in glibc. The problem disappears when I do
mv /lib/tls /lib/tls.disabled
Is this a known issue? I searched through the list archive with
various related keywords, but was unable to find such a report.
I still have no idea why tcc fails to run script in-place while
it can generate correct executable without "-run" option.
Is there any workaround to this problem, other than disabling TLS?
Thanks in advance.
--
Taisuke Yamada <address@hidden>, http://rakugaki.org/
2268 E9A2 D4F9 014E F11D 1DF7 DCA3 83BC 78E5 CD3A
Message to my public address may not be handled in a timely manner.
For a direct contact, please use my private address on my namecard.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tinycc-devel] tcc segmentation fault with thread local storage?,
Taisuke Yamada <=