Bug #33286 debug build of libmysql exposes wrong my_malloc/my_free functions

Submitted: 17 Dec 2007 10:29 Modified: 17 Dec 2007 22:31
Reporter: Jess Balint Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S3 (Non-critical)
Version:5.0/5.1 OS:Windows
Assigned to: CPU Architecture:Any
Tags: libmysql, SAFEMALLOC

[17 Dec 2007 10:29] Jess Balint
Description:
when doing a debug build on windows, SAFEMALLOC is defined and used internally. however, config-win.h does not define SAFEMALLOC and any application using my_malloc/my_free from libmysql will get the "non-safe" versions.

How to repeat:
this is a problem when trying to free memory allocated internally, eg. calling list_cons() (this uses the safe my_malloc internally) and later freeing the list node with my_free() (which won't use the safe my_free).

Suggested fix:
Since config-win.h is not generated, this may need to be a documented convention to add SAFEMALLOC if using a debug-built libmysql on windows.

I have not checked if this is placed in the my_config.h file on linux/unix, but it needs to be checked for the same issue.
[17 Dec 2007 22:31] MySQL Verification Team
Thank you for the bug report.

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

Page generated in 0.049 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.