Object alignment, was: cygwin failures - assertion "!(addr & FLAGS)" failed:
Billinghurst, David (CRTS)
Tue May 7 16:44:00 GMT 2002
After rebuilding binutils with 16-byte alignment
- the first libjava testsuite executable ran
- another dejagnu problem killed the testsuite
So this approach is promising, but will need to do some
more dejagnu hacking :-<
From: Tom Tromey [mailto:firstname.lastname@example.org]
Sent: Monday, 6 May 2002 10:24
To: Billinghurst, David (CRTS)
Cc: email@example.com; firstname.lastname@example.org
Subject: Re: Object alignment, was: cygwin failures - assertion "!(addr
& FLAGS)" failed:
>>>>> "David" == Billinghurst, David (CRTS) <David.Billinghurst@riotinto.com> writes:
David> So we need objects to be 8-byte aligned so that the low three
David> bits of the address are 0? Are there any ways around this, as
David> I don't think that this is the default on cygwin.
For libgcj this decision is made either by the GC (for dynamically
allocated objects) or the compiler (for statically allocated objects).
The GC should already be doing this.
The compiler might not, but that is something that, in theory, we can
fix entirely in gcj by setting the required alignment correctly.
David> - it is necessary to rebuild ld to ensure 8-byte alignment
... there is some problem getting ld to do this even when gcj sets the
alignment correctly on the type.
It looks like the alignment is in fact set correctly in gcj:
/* Hash synchronization requires at least 64-bit alignment. */
if (flag_hash_synchronization && POINTER_SIZE < 64)
DECL_ALIGN (decl) = 64;
More information about the Java