From owner-freebsd-current@FreeBSD.ORG Fri Jan 4 18:14:42 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C5DBAD65; Fri, 4 Jan 2013 18:14:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 65CA6E4; Fri, 4 Jan 2013 18:14:42 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id r04IEdxp083716; Fri, 4 Jan 2013 20:14:39 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.3 kib.kiev.ua r04IEdxp083716 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id r04IEc4D083715; Fri, 4 Jan 2013 20:14:38 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 4 Jan 2013 20:14:38 +0200 From: Konstantin Belousov To: Stefan Farfeleder Subject: Re: clang 3.2 RC2 miscompiles libgcc? Message-ID: <20130104181438.GL82219@kib.kiev.ua> References: <20121227150724.GA1431@mole.fafoe.narf.at> <50DC65F5.6060004@freebsd.org> <50E0BD66.4070609@FreeBSD.org> <20130102135950.GA1464@mole.fafoe.narf.at> <20130104154940.GD1430@mole.fafoe.narf.at> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NhnzZsTWd+R/yp6D" Content-Disposition: inline In-Reply-To: <20130104154940.GD1430@mole.fafoe.narf.at> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-current@freebsd.org, Dimitry Andric , Nathan Whitehorn X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 18:14:42 -0000 --NhnzZsTWd+R/yp6D Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 04, 2013 at 04:49:41PM +0100, Stefan Farfeleder wrote: > On Wed, Jan 02, 2013 at 02:59:50PM +0100, Stefan Farfeleder wrote: > > On Sun, Dec 30, 2012 at 11:17:10PM +0100, Dimitry Andric wrote: > > >=20 > > > I have been playing with Stefan's testcase for a while now, and while= I > > > can reproduce the crashes, I am still at a loss about the cause. It > > > does seem to have something to do with throwing exceptions, but I am > > > still not sure whether I am looking at a bug in boost, gcc, clang, or > > > libgcc... > > >=20 > > > Do you happen to have a smaller testcase, by any chance? > >=20 > > Not yet, but I'll try to come up with something smaller. >=20 > Here's a minimal test case that reproduces the bug: >=20 > $ cat throw-crash.cc > #include >=20 > void f2(void) { > std::string s; > throw std::runtime_error("foo"); > } >=20 > void f1(void) { > f2(); > } >=20 > int main(void) { > try { > std::string s1, s2; > f1(); > return 0; > } catch (const std::exception &) { > return 1; > } > } > $ g++ -O2 -finline-limit=3D0 throw-crash.cc=20 > $ ./a.out=20 > zsh: bus error (core dumped) ./a.out What is the backtrace ? Compile the system libraries (ld-elf, libc, libgcc etc) with the debugging information and obtain the backtrace once more. --NhnzZsTWd+R/yp6D Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ5xwMAAoJEJDCuSvBvK1BixkQAKKlG6UuLrcLIDTYZobr5xVV TpDaRk9K2vVq6oeFbJ7NEMhxqFq70qIk0Pnr51VFCFSNKB5ezSKTxsBucKoxW511 ZNWlqghsfafluN7MRM8u+tzFgP69rMeYsYZ+T8703RksmftCn/IKp8uVYt1Qdnr2 5sZCIGE4/enfNvY1VPEHELKcMCtDZS5JVWdNsNaE8NcudZuXIOlE4Ich0GQQ0P/r VYrw2SnZQMbj5D39Z6z5lvDJ641P9jxhSjnP30MLKBguKRWBPly/MjH0/URyxnSY xFYuzQV4Zp8I7ua2AdDiqqJGxABc3pC3PncgQ8fsiKc0LCewrK52aZWzOKargPQ6 AJC/37eduYdh9BkFSs+TMN7FJ8bRplKgupp3lNlDaK4enH89pR6wgOqevhWJ5K8d n9h5tx5PTBGFZNuKIgbQC8enx3nCy3GttdkqqcoHS15Co7Xzzx2Hahs21e+aOePK cvawiEfZRItHjoLsK2ET1ypYvRMPHUHueDzEKixixASayMXgPK3NIc0OF+eiFgSn MgmWHXl7FfsTcw+5FvYn2vjLcZXJCjJ+unAIhcwWqdUE2zyf7pJltF84V447Dao1 K+1d352YHxFe/RwxBy3eAyddNYOLI4e0pElvxsTNbSLp6ys5u4yKsXCBg12jOl/y /hnxkFXJR6wcs6doe5Qt =+7na -----END PGP SIGNATURE----- --NhnzZsTWd+R/yp6D--