This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug d/88462] All D execution tests FAIL on Solaris/SPARC
- From: "ibuclaw at gdcproject dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 12 Dec 2018 18:30:34 +0000
- Subject: [Bug d/88462] All D execution tests FAIL on Solaris/SPARC
- Auto-submitted: auto-generated
- References: <bug-88462-4@http.gcc.gnu.org/bugzilla/>
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)`.