The ElectricFence RPM is not compiled with the thread safe flags. In the
ElectricFence-2.2.2 Makefile, there is a line:
CFLAGS= -g -DUSE_SEMAPHORE $(PIC)
which sets up semaphore usage to make the ElectricFence malloc/free safe
when linked into a multithreaded application. The problem is that the make
in the %build section of the ElectricFence.spec file overrides CFLAGS and
therefore unsets the USE_SEMAPHORE define.
I changed the Makefile to use EXTRA_CFLAGS instead of CFLAGS and changed
the tstheap:, eftest:, and .c.o: compile commands to run:
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) etc.
and rebuilt the RPM. I can now debug multithreaded application with
ElectricFence no problem.
Created attachment 5420 [details]
OK. I didn't use the Makefile you supplied, I just defined the CFLAGS in the
specfile differently. The next time rawhide is updated it should show up.