[Bug nptl/23851] New: Bug in pthread_spin_unlock.S

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug nptl/23851] New: Bug in pthread_spin_unlock.S

cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=23851

            Bug ID: 23851
           Summary: Bug in pthread_spin_unlock.S
           Product: glibc
           Version: 2.29
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---
            Target: i386,x86-64

sysdeps/x86_64/nptl/pthread_spin_unlock.S has

ENTRY(pthread_spin_unlock)
        movl    $1, (%rdi)
        xorl    %eax, %eax
        retq
END(pthread_spin_unlock)

sfence is missing before the release store.  We must ensure that all writes
inside the critical section are complete before the lock is released.  Adding
sfence to x86-64 is OK.  i486 can be a problem.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug nptl/23851] Bug in pthread_spin_unlock.S

cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=23851

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
It is only necessary to use sfence after non-temporal store.

--
You are receiving this mail because:
You are on the CC list for the bug.