Bug #24498 | Stack overflow in mysqltest | ||
---|---|---|---|
Submitted: | 22 Nov 2006 10:28 | Modified: | 30 Jan 2007 3:44 |
Reporter: | Vasil Dimov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Tests | Severity: | S3 (Non-critical) |
Version: | 5.1.14-beta BK | OS: | |
Assigned to: | Magnus Blåudd | CPU Architecture: | Any |
[22 Nov 2006 10:28]
Vasil Dimov
[22 Nov 2006 10:32]
Vasil Dimov
Change "Category" from "Server" to "Server: Tests". I was unable to select the later in the initial submission.
[22 Nov 2006 19:19]
Sveta Smirnova
Thank you for the report. I can not repeat it on Linux. Please provide exact version of your operation system and describe how you built MySQL.
[23 Nov 2006 6:05]
Vasil Dimov
Hi Sveta, I did not mention my OS because I believe it is irrelevant. Anyway here it is: FreeBSD 6.2-PRERELEASE/amd64. I am using the stock compiler which is: $ gcc -v Using built-in specs. Configured with: FreeBSD/amd64 system compiler Thread model: posix gcc version 3.4.6 [FreeBSD] 20060305 $ MySQL is compiled with the BUILD/compile-amd64-debug-max script. Furthermore I have configured my malloc(3) to always initialize the returned memory with 0xd0. See the J option in http://www.freebsd.org/cgi/man.cgi?query=malloc.conf It is highly possible that you cannot reproduce this crash because you have occasional '\0' bytes in the memory area after the strings which are actually not '\0' terminated. The buf variable is quite big - 1024 bytes, the crash will not happen if there is at least one '\0' byte in v->name between 13th and 1024th byte. When looking at the contents of the stack after it got overwritten (0xd0d0d0d...) I think that this has something to do with my malloc configuration (see above).
[6 Dec 2006 21:31]
Magnus Blåudd
my_malloc can init allocated memory with zeroes.
[8 Dec 2006 15:12]
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/16658 ChangeSet@1.2583, 2006-12-08 16:08:54+01:00, msvensson@neptunus.(none) +1 -0 Bug#24498 Stack overflow in mysqltest - Thanks to Vasil Dimov for the patch!
[30 Jan 2007 3:44]
Paul DuBois
Noted in 4.1.23, 5.0.36, 5.1.15 changelogs. mysqltest crashed with a stack overflow.