malloc(): error: recursive call

David Xu davidxu at freebsd.org
Wed May 28 01:57:04 PDT 2003


----- Original Message ----- 
From: "Petri Helenius" <pete at he.iki.fi>
To: "Daniel Eischen" <eischen at pcnet5.pcnet.com>
Cc: "Daniel Eischen" <eischen at pcnet1.pcnet.com>; <freebsd-threads at freebsd.org>
Sent: Wednesday, May 28, 2003 3:24 PM
Subject: Re: malloc(): error: recursive call


> Alright, here goes:
> (it's ugly cut&paste with inadequate includes and stuff but fails as 
> expected)
> Uncomment the "extra" mutexes and it runs fine.
> 
> Complied with:
> gcc  -g -O2 -march=pentium   -D_REENTRANT -D_THREAD_SAFE -Wall -Wshadow 
> -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion 
> -Waggregate-return -Wstrict-prototypes -Wno-format  -pedantic 
> -Wno-long-long -c ttest.c
> gcc -static  -g -O2 -march=pentium   -D_REENTRANT -D_THREAD_SAFE -Wall 
> -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion 
> -Waggregate-return -Wstrict-prototypes -Wno-format  -pedantic 
> -Wno-long-long ttest.o -o ttest   -lkse
> 
> libs: # ls -l /usr/lib/libkse*
> -r--r--r--  1 root  wheel  229156 May 24 14:57 /usr/lib/libkse.a
> lrwxr-xr-x  1 root  wheel      11 May 24 14:57 /usr/lib/libkse.so -> 
> libkse.so.1
> -r--r--r--  1 root  wheel  121048 May 24 14:57 /usr/lib/libkse.so.1
> -r--r--r--  1 root  wheel  243042 May 24 14:57 /usr/lib/libkse_p.a
> 
> kernel:
> FreeBSD kompak.vuokselantie10.fi 5.1-BETA FreeBSD 5.1-BETA #7: Sat May 
> 24 10:49:11 GMT 2003     
> root at kompak.vuokselantie10.fi:/usr/src/sys/i386/compile/EMTEST  i386
> 
> # ./ttest
> free spin
> free spin
> free spin
> free spin
> free spin
> free spin
> free spin
> free spin
> free spin
> free spin
> free spin
> alloc spin
> free spin
> ttest in free(): error: recursive call
> Abort (core dumped)
> 
> and the code:
> (has more stuff than it needs because it has some debugging  built in)
> ...

Unfortunatly I have run your test program for five minutes without problem.

David Xu




More information about the freebsd-threads mailing list