[Pkg-dspam-misc] Segfault when running pthread_exit on kbsd

Thomas Preud'homme robotux at celest.fr
Mon Jan 23 23:19:45 UTC 2012

Greetings everyone,

while doing a rebuild of dspam after hardening flags have been enabled, we had 
a build failure on kfreebsd-*. Since the source code didn't change, we thought 
it was related to the hardening flags but we could reproduce the bug even 
without them enabled. Looking into the config.log gave us a small test case:

int main() {

  pthread_mutex_t m;
  pthread_mutex_init(&m, NULL);

This code compiled and linked with i486-kfreebsd-gnu-gcc -o conftest -g -O2 
conftest.c -pthread lead to a segmentation fault. Gdb gave us the following 

#0  0x2808dfee in __pthread_do_exit () from /lib/i386-kfreebsd-
#1  0x2808e2e1 in pthread_exit () from /lib/i386-kfreebsd-gnu/libpthread.so.0
#2  0x080483e9 in main () at conftest.c:50

Is this a bug in the pthread implementation or am I missing something obvious 
in the test case?

Please CC me on reply as I'm not subscribed to the list.

Best regards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-dspam-misc/attachments/20120124/db0cdcb7/attachment.pgp>

More information about the Pkg-dspam-misc mailing list