Bug #73760 TTASFutexMutex doesn't expects but does not request aligned m_lock_word

Submitted: 28 Aug 2014 15:00 Modified: 29 Aug 2014 13:14
Reporter: Mark Callaghan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[28 Aug 2014 15:00] Mark Callaghan
Description:
In 5.7.4m14 there is this in TTASFutexMutex...
                /* Check that lock_word is aligned. */
                ut_ad(!((ulint) &m_lock_word % sizeof(ulint)));

But that alignment is not requested...
private:
        MutexPolicy             m_policy;
        volatile lock_word_t    m_lock_word;

This would fix it for gcc...
        volatile new_lock_word_t        m_lock_word __attribute__ ((aligned (8)));

How to repeat:
NA

Suggested fix:
NA
[28 Aug 2014 18:09] MySQL Verification Team
Indeed after carefully analyzing the code, I am verifying this bug.
[28 Aug 2014 18:17] Davi Arnaut
MY_ALIGNED(MY_ALIGNOF(ulint))
[28 Aug 2014 18:51] Sunny Bains
Davi, Mark, Thanks! Fixed.
[29 Aug 2014 13:14] Daniel Price
Fixed as of the upcoming 5.7.5 release, and here's the changelog entry:

The "TTASFutexMutex", the mutex implementation that uses the Linux futex,
failed to request "m_lock_word" alignment. 

Thank you for the bug report.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.