https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103187

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.4                        |11.3
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #2)
> The relevant commit seems to be g:aeaea265cea3a2b2e772af7825351a4ceef29aac
> but that *should* only be an optimization to use futexes when available.

Ah no, because the HAVE_PLATFORM_WAIT macro was being set, but too late to
affect the value of the __platform_wait_uses_type variable template, it meant
that _S_wait_addr always returned &_M_w._M_ver and did a futex wait on that,
but the semaphore release() was doing a futex wake on &_M_counter instead.

> The
> fact it times out without that change suggests the non-futex code has a bug,
> and it's probably still there on trunk.

I think it's fixed by the above commit, which is in GCC 11.3 and later.

Reply via email to