I suspect I am not linking properly.  The symptom is that malloc/free
does not seem to behave in a thread safe manner.  In a XS module the
code uses the pthread library to create a couple of threads, in the
threads lots of mallocs and frees are performed.  The code will fail
from Segmentation fault.  The sample code below behaves the same on two
differt machines.  The first is a dual cpu x86 box running RedHat 6.0
Linux with a hand build kernel 2.2.16, perl rpm is perl-5.00503-11, and
glibc rpm is glibc-2.1.3-21.  The second machine is a dual cpu x86 box
running RedHat 6.1 Linux, stock kernel 2.2.12-20smp, perl
perl-5.00503-11, and glibc-2.1.2-11.

To compile edit makefile and type make.  Run test with 'perl test.pl'.
 
Thanks,
James Boorn

TT.tgz

Reply via email to