Date: Thu, 14 Mar 2002 10:00:38 -0500 From: Alexander Kabaev <ak03@gte.com> To: Terry Lambert <tlambert2@mindspring.com> Cc: imp@village.org, edhall@weirdnoise.com, mb@imp.ch, kris@obsecurity.org, jstocker@tzi.de, current@FreeBSD.ORG, hackers@FreeBSD.ORG, obrien@FreeBSD.ORG, edhall@screech.weirdnoise.com Subject: Re: gcc -O broken in CURRENT Message-ID: <20020314100038.4d45700f.ak03@gte.com> In-Reply-To: <3C9048FC.1C9C57B5@mindspring.com> References: <mb@imp.ch> <200203132015.g2DKFYv17886@screech.weirdnoise.com> <20020313.234345.88856963.imp@village.org> <3C9048FC.1C9C57B5@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a case of exception context register getting clobbered in shared library function call. GCC does not reload it when needed and this ultimately leads to semi-random word in program memory decremented by the __cp_pop_exception function. The bug is only triggered under very specific circumstances involving inline functions and nested degenerate exception handlers, that's why it existed unnoticed for quite some time. On Wed, 13 Mar 2002 22:53:48 -0800 Terry Lambert <tlambert2@mindspring.com> wrote: > "M. Warner Losh" wrote: > > In message: <200203132015.g2DKFYv17886@screech.weirdnoise.com> > > Ed Hall <edhall@weirdnoise.com> writes: > > : Exception-handling is broken with -O in -stable, and has been for > > years.: FreeBSD is one of the few systems that use setjmp/longjmp > > stack unwinds: to implement exceptions, so when the GCC folks broke > > that path, it was: never fixed. There are supposedly patches > > floating around that fix the: problem, but they either didn't work > > as advertised or the ball got dropped. > > > > Hmmmm, C++ exceptions work in -stable with -O and have for at least > > a year. At least they are working for us in our environment. > > What's busted? > > Per thread exception stacks? THat's where I'd look... > > -- Terry > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020314100038.4d45700f.ak03>