[Bug c++/19351] [DR 624] operator new[] can return heap blocks which are too small
fw at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 20 21:16:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19351
--- Comment #27 from Florian Weimer <fw at gcc dot gnu.org> 2012-08-20 21:13:29 UTC ---
Author: fw
Date: Mon Aug 20 21:13:23 2012
New Revision: 190546
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190546
Log:
Fix PR C++/19351: integer overflow in operator new[]
2012-08-20 Florian Weimer <fweimer@redhat.com>
PR c++/19351
* call.c (build_operator_new_call): Add size_check argument and
evaluate it.
* cp-tree.h (build_operator_new_call): Adjust declaration.
* init.c (build_new_1): Compute array size check and apply it.
2012-08-10 Florian Weimer <fweimer@redhat.com>
PR c++/19351
* g++.dg/init/new38.C: New test.
* g++.dg/init/new39.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/init/new38.C
trunk/gcc/testsuite/g++.dg/init/new39.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/init.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list