This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Long-standing error in exception handling by pool_allocator (contains untested patch)
- From: Joachim Kuebart <kuebart at mathematik dot uni-ulm dot de>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: Joachim Kuebart <kuebart at mathematik dot uni-ulm dot de>, libstdc++ at gcc dot gnu dot org
- Date: Sat, 9 Oct 2004 23:23:22 +0200
- Subject: Re: Long-standing error in exception handling by pool_allocator (contains untested patch)
- References: <20041009161531.GA653@jaja> <416833A4.6060609@suse.de>
Hi Paolo (again :),
On Sat, Oct 09, 2004 at 08:53:24PM +0200, Paolo Carlini wrote:
> Joachim Kuebart wrote:
>
> >Any comments and ideas are most welcome! I have verified that this patch
> >removes the described problem. I have not regression tested the patch
> >because
> >I do not have a current version of the library at hand. If requested I will
> >catch up on the regression tests as my time permits.
> >
> >
> Hi (again ;) Joachim and thanks for the patch!
>
> First blush, it looks correct to me, besided a couple of minor nits:
> 1- In the library we don't use plain throw but __throw_exception_again
> (this is related
> to -fno-exceptions)
Yeah sorry, I was expecting something like this and looked for another throw
in the same file but there was none :-)
> 2- I think we should catch only std::bad_alloc, not all the possible
> exceptions.
This should work and might be correct, however it seems to me that the rest
of the library uses catch (...) throughout. I wonder why? Does the standard
state what is supposed to happen if a user-written ::operator new() throws
something other than std::bad_alloc?
> Therefore, my plan would be preparing a simple testcase from your complete
> analysis, regression test the slighlty tweaked version, and repost it to
> the list
> for final review.
Sounds good to me as it saves me the trouble of compiling libstdc++ myself,
thanks!
cu Jo
--
La perfection est atteinte non quand il ne reste rien à ajouter, mais quand
il ne reste rien à enlever. (Antoine de Saint-Exupéry)