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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <[email protected]>:

https://gcc.gnu.org/g:aa042523ec421fdc3f461653582a738504e7c284

commit r17-6215-gaa042523ec421fdc3f461653582a738504e7c284
Author: Jonathan Wakely <[email protected]>
Date:   Mon Nov 9 16:32:29 2026 +0000

    libstdc++: Add check for std::thread::join() on that thread [PR128548]

    POSIX says that pthread_join() is undefined if the calling thread tries
    to join itself. Our std::thread::join() does not check for this
    (possible because Glibc documents that it will be detected and an error
    reported).

    libstdc++-v3/ChangeLog:

            PR libstdc++/128548
            * src/c++11/thread.cc (thread::join): Check for self-join.
            * testsuite/30_threads/thread/members/128548.cc: New test.

    Reviewed-by: Tomasz KamiÅski <[email protected]>

Reply via email to