Incorrect use of delete[] in ptr_rep

Bug #944826 reported by Paul J. Lucas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Paul J. Lucas

Bug Description

test/libunit/string

 ==28568== Mismatched free() / delete / delete []
==28568== at 0x4C26A4B: operator delete[](void*) (vg_replace_malloc.c:409)
==28568== by 0x5EED144: zorba::rstring<zorba::rstring_classes::ptr_rep<zorba::atomic_int, std::char_traits<char>, std::allocator<char> > >::~rstring() (ptr_rep.h:321)
==28568== by 0x5EE8969: void test_non_empty<zorba::rstring<zorba::rstring_classes::ptr_rep<zorba::atomic_int, std::char_traits<char>, std::allocator<char> > > >(zorba::rstring<zorba::rstring_classes::ptr_rep<zorba::atomic_int, std::char_traits<char>, std::allocator<char> > >&, char const*) (string.cpp:136)
==28568== by 0x5EE8D33: void test<zorba::rstring<zorba::rstring_classes::ptr_rep<zorba::atomic_int, std::char_traits<char>, std::allocator<char> > > >() (string.cpp:152)
==28568== by 0x5EEAA9A: zorba::UnitTests::test_string(int, char**) (string.cpp:792)
==28568== by 0x5EF5BCF: zorba::UnitTests::runUnitTest(int, char**) (unit_tests.cpp:72)
==28568== by 0x400BAC: main (lib_unit_test.cpp:34)
==28568== Address 0xaac7d70 is 0 bytes inside a block of size 6 alloc'd
==28568== at 0x4C27CC1: operator new(unsigned long) (vg_replace_malloc.c:261)
==28568== by 0x5EE83B8: void test_non_empty<zorba::rstring<zorba::rstring_classes::ptr_rep<zorba::atomic_int, std::char_traits<char>, std::allocator<char> > > >(zorba::rstring<zorba::rstring_classes::ptr_rep<zorba::atomic_int, std::char_traits<char>, std::allocator<char> > >&, char const*) (string.cpp:93)
==28568== by 0x5EE8D33: void test<zorba::rstring<zorba::rstring_classes::ptr_rep<zorba::atomic_int, std::char_traits<char>, std::allocator<char> > > >() (string.cpp:152)
==28568== by 0x5EEAA9A: zorba::UnitTests::test_string(int, char**) (string.cpp:792)
==28568== by 0x5EF5BCF: zorba::UnitTests::runUnitTest(int, char**) (unit_tests.cpp:72)
==28568== by 0x400BAC: main (lib_unit_test.cpp:34)

Related branches

Changed in zorba:
milestone: none → 2.2
Changed in zorba:
status: New → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.