Bug #710 | SmartHeap and MySQL libraries cause core dumps on Solaris | ||
---|---|---|---|
Submitted: | 24 Jun 2003 6:55 | Modified: | 24 Jun 2003 6:59 |
Reporter: | Eamon Doyle | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.0.13 | OS: | Solaris (Solaris 2.8) |
Assigned to: | CPU Architecture: | Any |
[24 Jun 2003 6:55]
Eamon Doyle
[24 Jun 2003 6:59]
MySQL Verification Team
There is no way for us to repeat this bug as we do not use SmartHeap libraries, nor do we have them. On Solaris we use Purify and Pure Coverage without any single problem.
[4 Jul 2003 5:46]
Eamon Doyle
For anybody that encounters this same problem with SmartHeap and MySQL client libraries on Solaris causing bus errors, the cause of the problem is with SmartHeap aligning heap blocks on 4byte offsets. Standard memory management routines align on 8byte offsets. The MySQL client libraries use 64bit integers - in particular, the MYSQL_RES structure contains an my_ulonglong row_count parameter. Aligning this parameter on a 4byte offset causes 'bus error, invalid address alignment' coredumps. Though the source of problem is in SmartHeap, I've avoided the problem by defining the constant NO_CLIENT_LONG_LONG in mysql.h before the my_ulonglong typedef declaration and then rebuilding the MySQL client libraries.