Bug #57761 strict alias violation in DataBuffer::seize() causes ndbd to crash with gcc4.5.1
Submitted: 27 Oct 2010 6:35 Modified: 27 Oct 2010 9:09
Reporter: Jonas Oreland Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[27 Oct 2010 6:35] Jonas Oreland
Description:
code in DataBuffer::seize() exploits fact that
offsetof(Segment, nextPool) == 0 and cast a Uint32 to Segment*

How to repeat:
try starting ndbd compiled with gcc4.5.1 -O3

Suggested fix:
cleanup code
[27 Oct 2010 6:38] 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/122005

3323 Jonas Oreland	2010-10-27
      ndb - bug#57761 - fix strict alias violation in DataBuffer::seize()
[27 Oct 2010 6:42] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:jonas@mysql.com-20101027063500-2vte8pekf0i8f1oe) (version source revid:jonas@mysql.com-20101027063500-2vte8pekf0i8f1oe) (merge vers: 5.1.51-ndb-6.3.39) (pib:21)
[27 Oct 2010 6:48] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:jonas@mysql.com-20101027064529-u2mq7ktcs5pqakla) (version source revid:jonas@mysql.com-20101027064529-u2mq7ktcs5pqakla) (merge vers: 5.1.51-ndb-7.0.20) (pib:21)
[27 Oct 2010 6:59] Jonas Oreland
pushed to 6.3.39, 7.0.20 and 7.1.9

DOCS: Prior to this fix, ndbd crashed during startup if compiled with gcc >= 4.5
[27 Oct 2010 9:09] Jon Stephens
Documented as follows in the NDB-6.3.39, 7.0.20, and 7.1.9 changelogs:

      Data nodes compiled with gcc 4.5 or higher crashed during 
      startup.

Closed.