[PATCH 2/2] (g)unzip: Optimize inflate_codes()

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Feb 11 23:14:44 UTC 2010



Denys Vlasenko <vda.linux at googlemail.com> wrote on 2010/02/11 23:52:30:

> From: Denys Vlasenko <vda.linux at googlemail.com>
> To: Joakim Tjernlund <joakim.tjernlund at transmode.se>
> Cc: busybox at busybox.net, Rob Landley <rob at landley.net>
> Date: 2010/02/11 23:52
> Subject: Re: [PATCH 2/2] (g)unzip: Optimize inflate_codes()
>
> On Thursday 11 February 2010 08:42, Joakim Tjernlund wrote:
> > >
> > > Great. But looks like you forgot to send the patch without this debug.
> > > The only patch I found has this:
> > >
> > > +                                       /* Align out addr */
> > > +                                       if (e < 3)
> > > +                                               fprintf(stderr, "error
> len:%d\n", e);
> >
> > Hehe, here we go then. Looking at the gzip code I think it is crap though.
> > The upstream gzip code is old and unoptimized. One should just scrap
> > it and redo it with zlib instead.
> >

>
> It segfaults on 277 Mb gz file (a source tree of old openoffice version):

what arch?

>
> # time ./busybox_old gunzip <OOo_2.0.2_src.tar.gz >/dev/null
>
> real    0m13.616s
> user    0m13.493s
> sys     0m0.116s
> # time ./busybox gunzip <OOo_2.0.2_src.tar.gz >/dev/null
> /bin/bash: line 1: 15635 Segmentation fault      ./busybox gunzip < OOo_2.0.
> 2_src.tar.gz > /dev/null
>
> real    0m2.198s
> user    0m2.186s
> sys     0m0.011s

Maybe you could stick that debug printout back?

  Jocke



More information about the busybox mailing list