Bug #18833 valgrind: Mismatched free()/delete/delete[] in SimBlockList
Submitted: 6 Apr 2006 7:34 Modified: 20 Apr 2006 6:11
Reporter: Stewart Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.9bk, 5.0.21bk, 4.1.19bk OS:
Assigned to: Stewart Smith CPU Architecture:Any

[6 Apr 2006 7:34] Stewart Smith
Description:
==19757== Mismatched free() / delete / delete []
==19757==    at 0x401BF77: free (vg_replace_malloc.c:235)
==19757==    by 0x80A0662: SimBlockList::unload() (SimBlockList.cpp:124)
==19757==    by 0x82850A6: NdbShutdown(NdbShutdownType, NdbRestartType) (Emulator.cpp:243)
==19757==    by 0x809FB2E: main (main.cpp:472)
==19757==  Address 0x44D2458 is 0 bytes inside a block of size 6,396 alloc'd
==19757==    at 0x401B7F6: operator new(unsigned) (vg_replace_malloc.c:164)
==19757==    by 0x80A0331: SimBlockList::load(EmulatorData&) (SimBlockList.cpp:96)
==19757==    by 0x809FA56: main (main.cpp:409)

How to repeat:
run ndbd under valgrind

Suggested fix:
use the correct free/delete/delete[]
[6 Apr 2006 11:10] Stewart Smith
doesn't seem to do any harm... (nobody's reported crashes on shutdown or anything) but is in the 4.1 and 5.0 trees too.
[6 Apr 2006 11:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4552
[6 Apr 2006 11:57] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4556
[6 Apr 2006 12:10] Stewart Smith
jonas approved 2nd patch.
[18 Apr 2006 7:33] Stewart Smith
Pushed to 4.1.19

not into 5.0 or 5.1 yet due to unmerged changesets (with conflicts).
[20 Apr 2006 6:11] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Not relevant to end-user documentation. Closed.