[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-07-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 Richard Biener changed: What|Removed |Added Target Milestone|10.5|11.5

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #11 from CVS Commits --- The master branch has been updated by Francois Dumont : https://gcc.gnu.org/g:5c9833d878602de20043a5b74e4c6acd33d5fb3e commit r13-5180-g5c9833d878602de20043a5b74e4c6acd33d5fb3e Author: François Dumont

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 Jonathan Wakely changed: What|Removed |Added Target Milestone|--- |10.5 --- Comment #10 from Jonathan

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #9 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:b9479ddc7a28fb672ca67304a67d66524d8200a4 commit r13-5044-gb9479ddc7a28fb672ca67304a67d66524d8200a4 Author: Jonathan Wakely

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #8 from Simon Marchi --- I tested with just patching my /usr/include, and it looks like it works fine, I'm able to run a program under my GDB. Removing the fix, I get back the hang.

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #7 from Jonathan Wakely --- __gnu_debug::_Safe_iterator_base::_M_detach in debug.cc isn't affected by the patch though. The fix is to the post-inc and post-dec members, so only the code that calls those needs to be recompiled.

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #6 from Simon Marchi --- Because some code trying to acquire the lock (see frame #7 in my backtrace) is in debug.cc, I thought it would maybe need to be changed too? But I don't really understand any of this.

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #5 from Jonathan Wakely --- The patch doesn't change libstdc++.so, it only changes the headers. You don't even need to rebuild GCC. You could just put a patched copy of safe_iterator.h in /tmp/x/debug and then compile with -I/tmp/x

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #4 from Simon Marchi --- Thanks for looking into this so quickly. I'll try to test the patch against my use case, but I might need some guidance. I know how to build gcc and install it in some non-default prefix. But then, do I

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #3 from Jonathan Wakely --- This was my reproducer, although it doesn't deadlock without the hack to use a single mutex for all objects. #define _GLIBCXX_DEBUG 1 #include int main() { std::vector v{1,2,3}; auto i = v.begin();

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 Jonathan Wakely changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #1 from Jonathan Wakely --- I've tried to reproduce this, but it depends on the addresses of the _Safe_iterator objects that get created, because they'll use different mutexes unless their addresses collide in the hash function.

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2023-01-05 Ever confirmed|0