This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/82635] std::thread's join broken on FreeBSD with all GCCs >= 5


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2017-10-20
     Ever confirmed|0                           |1

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
https://gcc.gnu.org/bugs/

What we need:
...
- the complete command line that triggers the bug;

Are you linking to libpthread?

Where does it crash?


(In reply to Hannes Hauswedell from comment #0)
> 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?

Nope.

The code is largely the same for GNU/Linux and FreeBSD, and I'm not aware of
any problems in it, and TSan doesn't show any, which suggests a problem in the
FreeBSD pthreads implementation.

I do recall something in FreeBSD's pthreads impl being non-conforming, where
the static PTHREAD_MUTEX_INITIALIZER (or maybe PTHREAD_COND_INITIALIZER)
creates an invalid object that then requires dynamic initialization on the
first use. There could be a race in that code (or I could be totally
misremembering).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]