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 d/88462] All D execution tests FAIL on Solaris/SPARC


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

--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Stepping through the backtrace, I see the following at Thread.initLocks
(core/thread.d around line 1719).


---

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

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


---

So there are two things.  Firstly, the object instance is type punned from a
void[N] array.  Secondly it is aligned to pointer size, not the alignment of
the underlying record type.

So I'm certain that the problem will be fixed if `align(Mutex.alignof)` is
replaced with `align(8)`.

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