From owner-freebsd-current Thu Mar 28 3:31:19 2002 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id E150D37B405 for ; Thu, 28 Mar 2002 03:31:08 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id WAA02428; Thu, 28 Mar 2002 22:31:01 +1100 Date: Thu, 28 Mar 2002 22:31:36 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Anders Nor Berle Cc: current@FreeBSD.ORG Subject: Re: linux_base-7 installation breaks with zlib 1.1.4 In-Reply-To: <2085.62.179.190.82.1017303516.squirrel@webmail.debolaz.com> Message-ID: <20020328222925.H7619-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message