Fix PR C++/19351: integer overflow in operator new[]
commit4a84253c9803e4c6831d85510d2c596f2e51ea55
authorFlorian Weimer <fweimer@redhat.com>
Mon, 20 Aug 2012 21:13:23 +0000 (20 23:13 +0200)
committerFlorian Weimer <fw@gcc.gnu.org>
Mon, 20 Aug 2012 21:13:23 +0000 (20 23:13 +0200)
treefc3295f979c18be864a1b430c97ff13ffa49cdde
parent5592815a885e6101054be5b7fbac7a223b698815
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.

From-SVN: r190546
gcc/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/new38.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/new39.C [new file with mode: 0644]