From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 13 13:52:52 2007 Return-Path: X-Original-To: bugs@freebsd.org Delivered-To: freebsd-bugs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D65E616A400 for ; Tue, 13 Mar 2007 13:52:52 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 6550813C4B9 for ; Tue, 13 Mar 2007 13:52:52 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.13.8/8.13.8) with ESMTP id l2DDqpLx098158 for ; Tue, 13 Mar 2007 16:52:51 +0300 (MSK) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.13.8/8.13.8/Submit) id l2DDqpn0098157 for bugs@freebsd.org; Tue, 13 Mar 2007 16:52:51 +0300 (MSK) (envelope-from ache) Resent-From: ache@nagual.pp.ru Resent-Date: Tue, 13 Mar 2007 16:52:50 +0300 Resent-Message-ID: <20070313135250.GA98123@nagual.pp.ru> Resent-To: bugs@freebsd.org X-Bogosity: Ham, spamicity=0.000000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by nagual.pp.ru (8.13.8/8.13.8) with ESMTP id l2DDFLOw097581 for ; Tue, 13 Mar 2007 16:15:29 +0300 (MSK) (envelope-from owner-freebsd-current@freebsd.org) Authentication-Results: nagual.pp.ru sender=owner-freebsd-current@freebsd.org; sender-id=pass; spf=pass Received: from hub.freebsd.org (hub.freebsd.org [69.147.83.54]) by mx2.freebsd.org (Postfix) with ESMTP id 013CF5DB97 for ; Tue, 13 Mar 2007 13:08:14 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) Received: by hub.freebsd.org (Postfix) id 71ADE16A514; Tue, 13 Mar 2007 13:08:14 +0000 (UTC) Delivered-To: ache@freebsd.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 6998916A511; Tue, 13 Mar 2007 13:08:14 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3149516A401 for ; Tue, 13 Mar 2007 13:08:08 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id A9C3D13C484 for ; Tue, 13 Mar 2007 13:08:07 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.13.8/8.13.8) with ESMTP id l2DD86iv097399; Tue, 13 Mar 2007 16:08:06 +0300 (MSK) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.13.8/8.13.8/Submit) id l2DD86qZ097398; Tue, 13 Mar 2007 16:08:06 +0300 (MSK) (envelope-from ache) Date: Tue, 13 Mar 2007 16:08:05 +0300 From: Andrey Chernov To: Max Laier Message-ID: <20070313130805.GA97256@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Max Laier , freebsd-current@freebsd.org References: <20070313121106.GA96293@nagual.pp.ru> <200703131333.11692.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <200703131333.11692.max@love2party.net> User-Agent: Mutt/1.5.14 (2007-02-12) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: freebsd-current@freebsd.org Subject: Re: Bad gcc -O optimization cause core dump. What to do? X-BeenThere: freebsd-bugs@freebsd.org List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 13:52:53 -0000 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 13, 2007 at 01:33:01PM +0100, Max Laier wrote: > > It calls "puts(NULL)" with core dump. > > It means "printf("%s\n", NULL)" is overoptimized. > > BTW, things like "printf("1%s\n", NULL)" are not overoptimized. > > Any ideas? Is it right or needs to be fixed? >=20 > See: http://www.ciselant.de/projects/gcc_printf/gcc_printf.html 3.1 So, treated as "not a bug" by gcc people.=20 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D15685 Sigh. It means printf-coding requires now intrinsic knowledge of gcc=20 implementation details because our printf confusingly prints "(null)" too. Convert printf back to segfault? ;) --=20 http://ache.pp.ru/ --+HP7ph2BbKc20aGI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFF9qI1Vg5YK5ZEdN0RAl82AJ95U7KdgA+82lri/Crrsm3jBAaSFACfcEs9 1B4IJqF0sTeSFMyiXNiRum8= =8sZS -----END PGP SIGNATURE----- --+HP7ph2BbKc20aGI--