[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-10-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #16 from CVS Commits --- The releases/gcc-11 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:90a4981e0951687056ec4735cfd3043b35a23502 commit r11-9109-g90a4981e0951687056ec4735cfd3043b35a23502 Author: Thomas

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-10-07 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #15 from Jonathan Wakely --- Backport to gcc-11 needed

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-10-06 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 H.J. Lu changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #13 from CVS Commits --- The master branch has been updated by Thomas Rodgers : https://gcc.gnu.org/g:f9f1a6efaaeeec06d5c07378734cb8eb47b976a7 commit r12-3587-gf9f1a6efaaeeec06d5c07378734cb8eb47b976a7 Author: Thomas Rodgers Date:

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #12 from Jonathan Wakely --- (In reply to Thomas Rodgers from comment #11) > Yes. I will submit a patch for this test shortly. The a.wait(aa) to a.wait(va) change is pre-approved, please just push when it's ready.

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-15 Thread rodgertq at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #11 from Thomas Rodgers --- (In reply to Jonathan Wakely from comment #10) > http://eel.is/c++draft/atomics#ref.generic.general-3.sentence-2 > > "While any atomic_­ref instances exist that reference the *ptr object, all > accesses

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #10 from Jonathan Wakely --- http://eel.is/c++draft/atomics#ref.generic.general-3.sentence-2 "While any atomic_­ref instances exist that reference the *ptr object, all accesses to that object shall exclusively occur through those

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #9 from Jonathan Wakely --- My point is that *any* read of aa is undefined while there is an atomic_ref using it, even in the absence of other threads. It happens to cause the race you describe, because the value of aa is changing

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #8 from Jonathan Wakely --- It's a test for std::atomic_ref, it has to use atomic_ref :-)

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-15 Thread fw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #7 from Florian Weimer --- (In reply to Jonathan Wakely from comment #6) > (In reply to Florian Weimer from comment #4) > > a.wait(aa); > > This line is undefined and needs to be a.wait(va) anyway. Yes, that's what I meant.

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #6 from Jonathan Wakely --- (In reply to Florian Weimer from comment #4) > a.wait(aa); This line is undefined and needs to be a.wait(va) anyway.

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-15 Thread rodgertq at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #5 from Thomas Rodgers --- (In reply to Florian Weimer from comment #4) > I think it's a test bug: > > std::atomic_ref a{ aa }; > > std::thread t([&] > { > a.store(bb); > a.notify_one(); >

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-15 Thread fw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 Florian Weimer changed: What|Removed |Added CC||fw at gcc dot gnu.org --- Comment #4

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-09-07 Thread rodgertq at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #3 from Thomas Rodgers --- This appears to be the test case itself.

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-08-04 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2021-08-04

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-08-04 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #2 from Uroš Bizjak --- (In reply to H.J. Lu from comment #0) > 29_atomics/atomic_ref/wait_notify.cc in 64-bit on Skylake server: > > It happens about once a few weeks. while true ; do ./a.out ; done will hang immediately.

[Bug target/101761] Random hang with 29_atomics/atomic_ref/wait_notify.cc

2021-08-03 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761 --- Comment #1 from Uroš Bizjak --- Probably related to PR97936.