https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82635
Bug ID: 82635 Summary: std::thread's join broken on FreeBSD with all GCCs >= 5 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: h2+bugs at fsfe dot org Target Milestone: --- See the attached code. It compiles "fine" everywhere, but the resulting binary crashes in some situations: It runs fine on all compilers on Linux; it runs fine on all versions of clang on FreeBSD and on GCC-4.9 on FreeBSD. With GCC>=5 (including current 8-snapshot) the program crashes after 5 (sometimes 6) iterations. This may depend on the hardware, I can't say for sure. It is also strange how it is only triggered after multiple iterations. The problem must have been introduced in the last months, I know for sure that it did not happen in June. However it seems strange that it affects all GCCs down to version 5. Maybe something that was backported? I am CCing FreeBSD's port maintainer in case something happened on the packaging side of things.