This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: operator new[] overflow (PR 19351)
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Chris Lattner <clattner at apple dot com>
- Cc: Joe Buck <Joe dot Buck at synopsys dot COM>, Gabriel Dos Reis <gdr at integrable-solutions dot net>, "Joseph S. Myers" <joseph at codesourcery dot com>, "gcc\ at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 02 Dec 2010 07:26:58 +0100
- Subject: Re: operator new[] overflow (PR 19351)
- References: <87vd3eqzvg.fsf@mid.deneb.enyo.de> <Pine.LNX.4.64.1011302127210.14117@digraph.polyomino.org.uk> <AANLkTima1zd5tMx80G1-NB1UJ00tOF8=9iYJDxAAfYoc@mail.gmail.com> <20101130231211.GI13905@synopsys.com> <4FB8FB3B-2F0F-408C-A548-ADF7CE52A4A0@apple.com>
* Chris Lattner:
> On overflow it just forces the size passed in to operator new to
> -1ULL, which throws bad_alloc.
This is also what my patch tries to implement.