-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Ping!
Am 29.08.2015 um 23:00 schrieb Kai Tietz: > > Am 09.08.2015 19:17 schrieb "Mattias Engdegård" <matti...@acm.org > <mailto:matti...@acm.org>>: >> >> 7 aug 2015 kl. 14.50 skrev Rainer Emrich <rai...@emrich-ebersheim.de > <mailto:rai...@emrich-ebersheim.de>>: >> >> > This fixes the issue, libgom.sum attached. Can we have this in head and in >> > 4.x ? >> >> That is probably the expedient solution even if we eventually get libgomp > fixed. (The patch adds an extra cycle or two on some critical paths but I > suppose we can live with that.) > > Agreed. We need to support also versions without such fix. diff --git a/mingw-w64-libraries/winpthreads/src/mutex.c b/mingw-w64-libraries/wi index fec341a..6e1b392 100644 - --- a/mingw-w64-libraries/winpthreads/src/mutex.c +++ b/mingw-w64-libraries/winpthreads/src/mutex.c @@ -56,7 +56,10 @@ typedef struct { static bool is_static_initializer(pthread_mutex_t m) { - - return (uintptr_t)m >= (uintptr_t)-3; + /* Treat 0 as a static initializer as well (for normal mutexes), + to tolerate sloppy code in libgomp. (We should rather fix that code!) */ + intptr_t v = (intptr_t)m; + return v >= -3 && v <= 0; } /* Create and return the implementation part of a mutex from a static -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJV8oiCAAoJEB3HOsWs+KJbUhQH/3VrTTfBGOa++dvJihXHAd55 mXElVi4ifcSBAYdK+EbNeg4zInUPqcXmAZNW7Ybl/lTkrG+HC9jiLACa7gFoZhk7 gtNhz8F3Pc6rnyAMmX6A/VMWNWbhMuU2+a0MdP+m11jUXIX3k3ETB/Q7IG+2MWcq MrQxD8UtS0Htd6Ptc2F1cdiSoultef0tFeF1VagpGDJlJKm03c4LYfY7RDY1Geng PXTCyvRFnMcjRjowzG2IVDB9gaY+4EK0J/WacYtGrd2sn/kqBrZZ/UOTNZnhKsLY CbbO59IZhHNyz8KaAyU78Do8hg70z9jP8KgiX5tIhPpok3azv1VFl0GdgMtWV70= =AhAs -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public