[Issue 19481] New: 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
Wed Dec 12 19:00:24 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19481

          Issue ID: 19481
           Summary: Aborting from
                    local/libphobos/libdruntime/core/sync/mutex.d(95)
                    Error: pthread_mutex_init failed.
           Product: D
           Version: D2
          Hardware: Other
                OS: Solaris
            Status: NEW
          Severity: major
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

Thread._locks is not suitably aligned.

---

__gshared align(Mutex.alignof) void[__traits(classInstanceSize, Mutex)][2]
_locks;

static void initLocks() @nogc
{
    foreach (ref lock; _locks)
    {
        lock[] = typeid(Mutex).initializer[];
        (cast(Mutex)lock.ptr).__ctor();
    }
}

---

_locks should be aligned to pthread_mutex_t, not pointer size.

--


More information about the Digitalmars-d-bugs mailing list