Bug #23736 Pointer free error in mysqlbinlog
Submitted: 27 Oct 2006 19:25 Modified: 10 Apr 2007 19:00
Reporter: Chuck Bell Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.1.13 OS:Windows (Windows)
Assigned to: Iggy Galarza CPU Architecture:Any

[27 Oct 2006 19:25] Chuck Bell
The mysqlbinlog client issues the error: "Error: Freeing pointer out of range at line 95, '..\mysys\mf_tempdir.c'" when freeing the tempdir array. This appears when running in debug on Windows. I do not see this problem on Linux.

How to repeat:
Run the mysqlbinlog client and allow output to print to the console. I ran it using the switches:

mysqlbinlog --short-form - < master-bin.000001

Suggested fix:
It appears that the malloc is issuing memory that is outside the boundaries monitored by my_free().
[27 Oct 2006 19:56] MySQL Verification Team
Thank you for the bug report.

c:\mysql\bin>mysqlbinlog --short-form - < c:\mysql\data\light-bin.000002
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 98, event_type: 15
# End of log file
ROLLBACK /* added by mysqlbinlog */;
Error: Freeing pointer out of range at line 92, '\cygwin\home\miguel\mysql-5.1\mysys\mf_tempdir.c'
[10 Mar 2007 1:21] Iggy Galarza
Bug#25760 is a duplicate symptom
[20 Mar 2007 14:34] 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:


ChangeSet@1.2403, 2007-03-20 10:34:25-04:00, iggy@recycle.(none) +4 -0
  Bug#23736 Pointer free error in mysqlbinlog
  - Mis-matched SAFEMALLOC defines caused misleading error message.
[22 Mar 2007 19:53] Mads Martin Joergensen
Pushed to 5.1.17
[31 Mar 2007 23:30] Paul DuBois
Noted in 5.1.17 changelog.

Debug builds of mysqlbinlog could fail with a memory error.

Setting report to Patch Queued pending fix for 5.0.x.
[10 Apr 2007 16:03] Timothy Smith
This was also pushed into 5.0.40 on 22 Mar, but was not properly marked at that time.  Our apologies.
[10 Apr 2007 19:00] Paul DuBois
Noted in 5.0.40 changelog.