Bug #12042 User breakpoint exception calling free()
Submitted: 19 Jul 2005 22:03 Modified: 23 Jul 2005 10:28
Reporter: Dean Ellis Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S1 (Critical)
Version:4.0 OS:Windows (Windows)
Assigned to: Alexey Botchkov CPU Architecture:Any

[19 Jul 2005 22:03] Dean Ellis
Description:
Running libmysqld application compiled with VC++ 6.0 in Debug mode, _within_ the VC++ 6.0 debugger, results in "User breakpoint exception"s during such calls as:

mysql_close()
...
my_free((gptr) mysql->host_info,MYF(MY_ALLOW_ZERO_PTR));

or clean_up()
my_free(charsets_list, MYF(MY_ALLOW_ZERO_PTR));

and similar.

How to repeat:
A trivial libmysqld application (mysql_server_init();mysql_server_end();) demonstrates this exception with a VC++ 6.0 debug build running within the debugger.

Suggested fix:
Check to ensure we have not free()d something twice, or similar.
[21 Jul 2005 12:13] 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/internals/27432
[23 Jul 2005 10:28] Alexey Botchkov
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