From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25468 invoked by alias); 9 May 2011 14:09:18 -0000 Received: (qmail 25460 invoked by uid 22791); 9 May 2011 14:09:17 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qy0-f169.google.com (HELO mail-qy0-f169.google.com) (209.85.216.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 May 2011 14:08:55 +0000 Received: by qyk2 with SMTP id 2so1131024qyk.0 for ; Mon, 09 May 2011 07:08:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.46.74 with SMTP id i10mr5140826qcf.64.1304950131931; Mon, 09 May 2011 07:08:51 -0700 (PDT) Received: by 10.229.182.7 with HTTP; Mon, 9 May 2011 07:08:51 -0700 (PDT) In-Reply-To: <20110509135326.GU7018@bubble.grove.modra.org> References: <20110505051832.GA28229@intel.com> <20110505082721.GG7018@bubble.grove.modra.org> <20110505141230.GJ7018@bubble.grove.modra.org> <20110507081035.GR7018@bubble.grove.modra.org> <20110507140441.GS7018@bubble.grove.modra.org> <20110509135326.GU7018@bubble.grove.modra.org> Date: Mon, 09 May 2011 14:09:00 -0000 Message-ID: Subject: Re: PATCH: PR ld/12730: regression] crash when allocating in a static constructor From: "H.J. Lu" To: Binutils Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00106.txt.bz2 On Mon, May 9, 2011 at 6:53 AM, Alan Modra wrote: > I'm starting to wonder whether ld/testsuite/ld-elf/pr12730.cc is > valid. =A0Does gcc actually make any guarantee about order of static > constructors and __attribute ((constructor)) functions? I have similar doubt. > Compiled with gcc-4.3 branch g++, the testcase segfaults at all > optimization levels. =A0Compiled with gcc-4.4 branch g++, the testcase > runs at -O0 but segfaults at -O1 and above. =A0It happens to run OK with > gcc mainline and 4.6. =A0Given that behaviour, and the fact that some > popular distros ship gcc-4.4 based compilers, I'm thinking that the > testcase should be removed. > I will do that. --=20 H.J.