Bug 20935 - ElectricFence not compiled threadsafe
Summary: ElectricFence not compiled threadsafe
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ElectricFence
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Powers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-16 01:13 UTC by Bill Woodward
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-11-16 16:52:51 UTC
Embargoed:


Attachments (Terms of Use)
Updated Makefile (1.85 KB, text/plain)
2000-11-16 01:14 UTC, Bill Woodward
no flags Details

Description Bill Woodward 2000-11-16 01:13:41 UTC
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.

Comment 1 Bill Woodward 2000-11-16 01:14:48 UTC
Created attachment 5420 [details]
Updated Makefile

Comment 2 Tim Powers 2000-11-16 16:52:48 UTC
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.

Tim


Note You need to log in before you can comment on or make changes to this bug.