From owner-cvs-all Sat Apr 20 20:29: 4 2002 Delivered-To: cvs-all@freebsd.org Received: from w250.z064001178.sjc-ca.dsl.cnc.net (w250.z064001178.sjc-ca.dsl.cnc.net [64.1.178.250]) by hub.freebsd.org (Postfix) with SMTP id D25B337B41B for ; Sat, 20 Apr 2002 20:28:45 -0700 (PDT) Received: (qmail 23247 invoked by uid 1000); 21 Apr 2002 03:29:07 -0000 Date: Sat, 20 Apr 2002 20:28:45 -0701 From: Jos Backus To: rsync@lists.samba.org Cc: cvs-all@FreeBSD.ORG Subject: Re: rsync breaks on FreeBSD without -O2?(fwd from grog@FreeBSD.org) PR 36998 Message-ID: <20020421032907.GB23136@lizzy.catnook.com> Reply-To: jos@catnook.com Mail-Followup-To: rsync@lists.samba.org, cvs-all@FreeBSD.ORG References: <20020420193712.O10865@va.samba.org> <20020421032505.GA23136@lizzy.catnook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020421032505.GA23136@lizzy.catnook.com> User-Agent: Mutt/1.3.28i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Apr 20, 2002 at 08:24:43PM -0701, Jos Backus wrote: > Here's some mail from freebsd-cvs-all > (<20020420171059.A593@xor.obsecurity.org>). Bruce Evans submitted this > workaround which has been incorporated into the FreeBSD tree. I think we > should do the same. I can do the honors :-) Index: zlib/infcodes.c =================================================================== RCS file: /data/cvs/rsync/zlib/infcodes.c,v retrieving revision 1.3 diff -u -r1.3 infcodes.c --- zlib/infcodes.c 2002/03/12 01:14:58 1.3 +++ zlib/infcodes.c 2002/04/21 03:28:49 @@ -197,8 +197,13 @@ c->mode = COPY; 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) { NEEDOUT -- Jos Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos@catnook.com _/_/ _/_/_/ use Std::Disclaimer; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message