Bug #25920 Bus error mysqldump efter upgrade 4.1 to 5.x
Submitted: 29 Jan 2007 16:02 Modified: 27 Mar 2007 12:02
Reporter: Sergei Golubchik Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S2 (Serious)
Version:5.0 OS:Linux (Linux/Sparc)
Assigned to: Magnus Blåudd CPU Architecture:Any

[29 Jan 2007 16:02] Sergei Golubchik
Description:
Reported by Francesco Riosa:

Hello, as subject tell we are experiencing a regression 4.1 => 5.0 .
Basically "mysqldump" crash with "bus error" on ultrasparc processor.

A slightly more in depth research show that */client.c use multiple times
a suspect cast:

test(*(uint*) arg)

2953      case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
2954        if (!arg || test(*(uint*) arg))
2955          mysql->options.client_flag|= CLIENT_SSL_VERIFY_SERVER_CERT;

the cast to work should be aligned at 4 bytes but it's not, for example
we got

with #0  0x701acc2c in mysql_options (mysql=0x2df18,
option=MYSQL_OPT_SSL_VERIFY_SERVER_CERT, arg=0x2deba "")

mod(0x2deba ; 4) == 2

Thanks in advance:
Francesco R.

How to repeat:
http://bugs.gentoo.org/show_bug.cgi?id=157408

Suggested fix:
use uint4korr for unaligned reads
[27 Mar 2007 12:02] Magnus Blåudd
Duplicate of bug#24121