On Thu, 28 Mar 2002, Anders Nor Berle wrote: > linux_base-7 (And most likely other ports as well) seems to be broken after zlib >1.1.4 > was committed to -current. Zlib was made with fresh source from today (28.3) and rpm > recompiled. > > ===> Installing for linux_base-7.1_2 > kern.fallback_elf_brand: 3 -> 3 > glibc-common-2.2.2-10.i386.rpm > Segmentation fault - core dumped > *** Error code 139 > > Not particulary promising when you look at the core backtrace from rpm... > > #0 0x8090a3f in inflate_codes (s=0x8150380, z=0x8154b00, r=0) > at /usr/src/lib/libz/infcodes.c:203 > 203 while (f < s->window) /* modulo window size-"while" instead > */ (gdb) bt > #0 0x8090a3f in inflate_codes (s=0x8150380, z=0x8154b00, r=0) > at /usr/src/lib/libz/infcodes.c:203
I use the following quick fix for the corresponding core dump in man and zgrep. %%% Index: infcodes.c =================================================================== RCS file: /home/ncvs/src/lib/libz/infcodes.c,v retrieving revision 1.3 diff -u -2 -r1.3 infcodes.c --- infcodes.c 11 Mar 2002 22:36:26 -0000 1.3 +++ infcodes.c 19 Mar 2002 00:35:28 -0000 @@ -201,6 +201,11 @@ case COPY: /* o: copying bytes in window, waiting for space */ f = q - c->sub.copy.dist; - while (f < s->window) /* modulo window size-"while" instead */ - f += s->end - s->window; /* of "if" handles invalid distances */ + { + /* XXX work around a gcc bug. */ + volatile inflate_blocks_statef *s1 = s; + + while (f < s1->window) /* modulo window size-"while" instead */ + f += s1->end - s1->window; /* of "if" handles invalid distances */ + } while (c->len) { %%% Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message