This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


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

Re: c++/517: New causes seg fault while malloc correctly return null


The following reply was made to PR c++/517; it has been noted by GNATS.

From: Phil Edwards <pedwards@disaster.jaj.com>
To: jdrrun@gte.net
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/517: New causes seg fault while malloc correctly return null
Date: Fri, 8 Sep 2000 12:58:15 -0400

 On Fri, Sep 08, 2000 at 04:33:57PM -0000, jdrrun@gte.net wrote:
 
 > >Environment:
 > Redhat linux 6.1, Redhat linux 6.2, Mandrake 6.0
 
 You didn't mention which version of the compiler you're using.  I don't
 have any of those three distros handy, but I'm assuming they're 2.95.x.
 
 
 > >Fix:
 > correct implementaion of new so that it returns std::bad_alloc or a null pointer.
 
 This works fine (well, a bad_alloc is thrown) with a more recent compiler
 snapshot and a libstdc++-v3 snapshot.
 
 Also, I have to set a shell process resource limit on the heap size before
 you'll see a failure; I suspect you already have such a limit.
 
 
 Phil
 

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