Subject: pkg/8981:
To: None <>
From: None <>
List: netbsd-bugs
Date: 12/10/1999 21:30:41
>Number:         8981
>Category:       pkg
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 10 21:30:00 1999
Redback Networks
>Release:        <NetBSD-current source date>1.4.1
System: NetBSD 1.4.1 NetBSD 1.4.1 (GENERIC) #1: Tue Aug 10 00:03:09 MEST 1999 fvdl@struis:/usr/src/sys/arch/i386/compile/GENERIC i386

The pthread libs coredump as soon as a call from system() finishes.
cat >z.c<<EOF
#include <stdlib.h>
int main() {
gcc -D_REENTRANT -g -I/usr/pkg/pthreads/include -L/usr/pkg/pthreads/lib z.c -o z -lpthread

watch ls get executed, and then ./z core. the gcc backtrace:
(gdb) bt
#0  0x4009aadb in kill ()
#1  0x4009a859 in abort ()
#2  0x400319d2 in context_switch_done ()
#3  0x40031f2b in pthread_resched_resume ()
#4  0x400302ce in waitpid ()
#5  0x40048423 in system ()
#6  0x17e6 in main () at z.c:3

I'm using the stock gcc with 1.4.1, and the stock pkgsrc mit-pthreads
(15 Nov 1999 Makefile date).
Got me.
pthreads causes coredumps