Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2013 20:14:38 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Stefan Farfeleder <stefanf@freebsd.org>
Cc:        freebsd-current@freebsd.org, Dimitry Andric <dim@freebsd.org>, Nathan Whitehorn <nwhitehorn@freebsd.org>
Subject:   Re: clang 3.2 RC2 miscompiles libgcc?
Message-ID:  <20130104181438.GL82219@kib.kiev.ua>
In-Reply-To: <20130104154940.GD1430@mole.fafoe.narf.at>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <stdexcept>
>=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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130104181438.GL82219>