]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added allocation and deallocation of zero-sized array.
authorBart Van Assche <bvanassche@acm.org>
Tue, 13 May 2008 16:16:14 +0000 (16:16 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 13 May 2008 16:16:14 +0000 (16:16 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8060

exp-drd/tests/new_delete.cpp

index 8ec51e80d86bbcf997ddf7ec111c26c82fef0d89..45664c1633385059abc317c7d06adeb080075198 100644 (file)
@@ -4,11 +4,15 @@
 
 int main(int argc, char** argv)
 {
+  int zero = 0;
   int* p = new int;
   int* q = new int[733];
   delete[] q;
   delete p;
 
+  q = new int[zero];
+  delete q;
+
   fprintf(stderr, "Success.\n");
 
   return 0;