Bug #44582 USED_MEM::left not set in alloc_root for debug builds

Submitted: 30 Apr 2009 18:10 Modified: 13 Feb 2014 18:27
Reporter: Mark Callaghan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0,5.1, 6.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: alloc_root, Contribution, debug

[30 Apr 2009 18:10] Mark Callaghan
Description:
alloc_root does not set USED_MEM::left for the HAVE_purify code. Also a bit more can be done to support valgrind in this code.

This code is missing from the HAVE_purify code in alloc_root:
next->left= Size-ALIGN_SIZE(sizeof(USED_MEM));

I will submit a patch here with possible changes for valgrind

How to repeat:
read the source
[30 Apr 2009 18:11] Mark Callaghan
Patch for my_alloc.c and 5.0.37

Attachment: mad (application/octet-stream, text), 2.76 KiB.

[4 May 2009 6:28] Sveta Smirnova
Thank you for the report.

Verified as described.
[13 Feb 2014 18:27] Paul DuBois
Noted in 5.7.4 changelog.

Code instrumented with Valgrind did not preallocate memory in
alloc_root(), to help find bugs. This behavior is now also enabled if
ASAN (address sanitizer) is used.

(The "used_mem::left" issue was fixed as well.)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.