This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Long-standing error in exception handling by pool_allocator (contains untested patch)


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]