[BusyBox] Segfault in awk.

Rob Landley rob at landley.net
Wed Feb 4 08:59:09 UTC 2004


Here's a testcase that makes it go "boing".

Specifically, it's going boing in the while loop around line 1050, in 
parse_expr:

            /* for binary and postfix-unary operators, jump back over
             * previous operators with higher priority */
            vn = cn;
            while ( ((t.info & PRIMASK) > (vn->a.n->info & PRIMASK2)) ||
              ((t.info == vn->info) && ((t.info & OPCLSMASK) == OC_COLON)) )
                vn = vn->a.n;

I have _no_idea_ what it's trying to do.  May I just say that single character 
global variables are evil?  Right...

Extract the tarball, fix the path in the shellscript so it can find busybox, 
and run the shellscript.  It will segfault immediately.  (This is also 
extracted from the glibc build, by the way.  This is as isolated as I can get 
the testcase, I've traced it through to the point where the failure is 
occuring, I'd have to spend a week coming up to speed on the code to 
understand why.  If anybody else already knows this bit...  I don't even know 
the awk language...)

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boo.tbz
Type: application/x-bzip2
Size: 2142 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20040204/99ccdf01/attachment.bin 


More information about the busybox mailing list