[BusyBox] Segfault in sed during binutils build.

Rob Landley rob at landley.net
Mon Sep 15 08:49:29 UTC 2003


I really should be in bed, but I'm not. :)

On Sunday 14 September 2003 22:04, Glenn McGrath wrote:

> Andrew Walrond is also using a similar approach, see
> http://www.busybox.net/lists/busybox/2003-September/009236.html

Cool.  Maybe I'll team up with him once I've made some progress. :)

> > On the bright side, sed is fairly well documented as to how it SHOULD
> > work, and I've got gnu sed to produce the output the package is
> > expecting for comparison purposes, and the sed source is only about
> > 1000 lines (of which I've now read about 2/3 pretty closely) so... :)
> >
> > I just don't want to spend my time reinventing the wheel.  But if
> > you're not interested in going down this particular rathole... :)
>
> One particular rathole i dont want to go back down, is the sed newline
> hack that i put in which is required to parse any configure script. (The
> line numbering part)

I'll look at it more closely later in the week (I've just gone back to grad 
school, and monday and tuesday contain the majority of my course load; I'm in 
class until about 8 pm both days).

But my itch is getting busybox and uclibc to work together, hence...

> If i remember correctly using a newline character isnt supported in
> libc's regex's, the hack i did is to convert '\n' into "\\n" and back.

Working around deficiencies in glibc doesn't interest me much, and adding 
newline match target support to uclibc (maybe with yet another flag to the 
regex thing to activate it, I dunno I haven't looked at it) sounds like a 
cleaner solution for my particular needs. :)

> I suspect its breaking some scripts that have a "\\n" in their regex, i
> was just happy i had something that worked, didnt look for a better
> solution.

Um, according to the standard, the pattern space is just one line, right?  So 
the newline can only _be_ at the end, so this is a synonym for one of those 
begin/end matching characters ($, I think...)  Or am I misunderstanding?  
(Keep in mind it's almost 4 am my time...)

> If you really want set your sights on something that might be a good
> challenge.
>
> Im glad that your taking an active interest in sed, while there is some
> momentum in that direction i will go with it.

I'm all for it myself.  The busybox code is WAY easier to read and work with 
than anything I've seen the FSF put out in the past ten years.  The whole 
minimalism/featuritis pendulum thing is a bit overdue for a swing back 
towards cleaning up and slimming down stuff, if you ask me...

> Glenn

Rob



More information about the busybox mailing list