Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1846 closed defect (fixed)

bc -l segmentation faults

Reported by: dnicholson@… Owned by: dnicholson@…
Priority: normal Milestone: 6.2.0
Component: BOOK Version: SVN
Severity: major Keywords:
Cc:

Description

Bc segfaults when invoked with the standard math library (-l). See this thread for discussion:

http://linuxfromscratch.org/pipermail/blfs-support/2006-March/058971.html

The fix already exists in our repo:

http://www.linuxfromscratch.org/patches/downloads/bc/bc-1.06-fixes-1.patch

Oddly, this patch is from a while back, and I have a working bc on a gcc-3.4 system without this patch. I think the fix should go into the book.

However, that would put bc at 3 patches with a total of 4 lines changed. The same thing can be accomplished with these 4 sed's (I like sed's and don't like patches):

sed -i '/PROTO.*readline/d' bc/scan.l
sed -i '/flex -I8/s/8//' configure
sed -i '/stdlib/a #include <string.h>' lib/number.c
sed -i 's/^  program_counter/static &/' bc/load.c

Any thoughts?

Change History (5)

comment:1 by bdubbs@…, 18 years ago

I prefer seds too. Patches are not as obvious as to what they are changing. It is especially nice when different techniques are used because they provide more educational content.

comment:2 by dnicholson@…, 18 years ago

Owner: changed from blfs-book@… to dnicholson@…
Status: newassigned

comment:3 by Randy McMurchy, 18 years ago

While this is being fixed, it should be considered whether or not to remove the libedit dependency. Though the dependency is valid, installing libedit really screws up the system.

comment:4 by dnicholson@…, 18 years ago

Resolution: fixed
Status: assignedclosed

Fix committed in r5746. Closing.

comment:5 by dnicholson@…, 18 years ago

Also removed libedit as was discussed on blfs-dev since it causes problems and is no longer maintained.

Note: See TracTickets for help on using tickets.