[BLFS Trac] #1846: bc -l segmentation faults

BLFS Trac trac at linuxfromscratch.org
Fri Mar 17 15:19:27 PST 2006

#1846: bc -l segmentation faults
 Reporter:  dnicholson at linuxfromscratch.org  |       Owner:  blfs-book at linuxfromscratch.org
     Type:  defect                           |      Status:  new                           
 Priority:  normal                           |   Milestone:  6.2                           
Component:  BOOK                             |     Version:  a-SVN                         
 Severity:  major                            |    Keywords:                                
 Bc segfaults when invoked with the standard math library (-l).  See this
 thread for discussion:


 The fix already exists in our repo:


 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

 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?

Ticket URL: <http://wiki.linuxfromscratch.org/blfs/ticket/1846>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch

More information about the blfs-book mailing list