[Issue 19481] Aborting from local/libphobos/libdruntime/core/sync/mutex.d(95) Error: pthread_mutex_init failed.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 13 21:29:36 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19481
--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject.org> ---
According to response, the alignment of _locks[0] is fine, _locks[1] is the
problem.
>>>
Unfortunately, this doesn't work: the first time through, _locks[0] was
already 8-byte aligned and everything worked fine. This remained when
using align(8) instead. However, Mutex is 44 bytes on 32-bit
Solaris/x86, so again _locks[1] lands on a non-8 byte boundary and
pthread_mutex_init fails.
I tried rouding up the size of the _locks array members to a multiple of
8, but that let the constructor already fail the first time through
where _d_arraycopy checks that the right amount of data is copied:
_d_arraycopy -> rt.util.array.enforceRawArraysConformable ->
rt.util.array._enforceSameLength
<<<
--
More information about the Digitalmars-d-bugs
mailing list