From owner-freebsd-stable Sat Apr 28 3:59:32 2001 Delivered-To: freebsd-stable@freebsd.org Received: from maila.telia.com (maila.telia.com [194.22.194.231]) by hub.freebsd.org (Postfix) with ESMTP id D80B837B423 for ; Sat, 28 Apr 2001 03:59:27 -0700 (PDT) (envelope-from ertr1013@student.uu.se) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by maila.telia.com (8.11.2/8.11.0) with ESMTP id f3SAxQG29544 for ; Sat, 28 Apr 2001 12:59:26 +0200 (CEST) Received: from ertr1013.student.uu.se (h185n2fls20o913.telia.com [212.181.163.185]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id MAA02798 for ; Sat, 28 Apr 2001 12:59:25 +0200 (CEST) Received: (qmail 5697 invoked by uid 1001); 28 Apr 2001 10:59:29 -0000 Date: Sat, 28 Apr 2001 12:59:29 +0200 From: Erik Trulsson To: stable@FreeBSD.ORG Subject: Re: Trouble with 4.3-RELEASE compiler Message-ID: <20010428125928.A5681@student.uu.se> Mail-Followup-To: stable@FreeBSD.ORG References: <20010427194022.A18639@roma.coe.ufrj.br> <200104280127330789.011EEEF5@tensor.xs4all.nl> <20010428093802.59828860.steveo@eircom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010428093802.59828860.steveo@eircom.net>; from steveo@eircom.net on Sat, Apr 28, 2001 at 09:38:02AM +0200 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Apr 28, 2001 at 09:38:02AM +0200, Steve O'Hara-Smith wrote: > On Sat, 28 Apr 2001 01:27:33 +0200 > "Dimitry Andric" wrote: > > DA> Squid with gcc 2.95.2 and optimization (both -O, -O2 and -O666), and > DA> I can assure you it bombed out with inexplicable null pointer > DA> accesses. Yet when you compile with -O0, no such thing happens... > > I have been working getting swish++ set up as a port (4.3-STABLE) and > I've found that the search program only works if compiled with no -O setting, > -O3 (the original) and -O cause segmentation violation, while -O2 gave an > illegal instruction trap. The index program OTOH appears to work with all > optimisations settings. > > It makes me wonder just how safe -O is :( > Although it is quite possible that gcc generates incorrect code in some cases when invoked with -O it is not very likely. I would say that it is much more likely that the code which is being compiled contains a bug that is exposed by the optimization and that the code just happens to work when comiled with -O0. Generally I would say that -O is *safer* than -O0 for the simple reason that it is used more and therefore gets more testing. -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message