• Sergey Vojtovich's avatar
    MDEV-6450 - MariaDB crash on Power8 when built with advance tool · c0ebb3f3
    Sergey Vojtovich authored
                chain
    
    InnoDB mutex_exit() function calls __sync_test_and_set() to release
    the lock. According to manual this function is supposed to create
    "acquire" memory barrier whereas in fact we need "release" memory
    barrier at mutex_exit().
    
    The problem isn't repeatable with gcc because it creates
    "acquire-release" memory barrier for __sync_test_and_set().
    ATC creates just "acquire" barrier.
    
    Fixed by creating proper barrier at mutex_exit() by using
    __sync_lock_release() instead of __sync_test_and_set().
    c0ebb3f3
sync0sync.ic 18.7 KB