Subject: Re: more gcc4 woes
To: Michael Lorenz <macallan@netbsd.org>
From: Martin Husemann <martin@duskware.de>
List: port-sparc
Date: 07/03/2006 00:13:17
On Sun, Jul 02, 2006 at 02:51:14PM -0400, Michael Lorenz wrote:
> trap type 0x7: pc=0xf010ce2c npc=0xf010ce30 psr=44000c6<S,PS>
> kernel: alignment fault trap
> Stopped in pid 430.3 (gcvs) at netbsd:sa_upcall_userret+0x1e4:
> std %g2, [%o0 + 0x18]

Can you show %o0 here?

The code is:

        kup = kmem_zalloc(sizeof(*kup), KM_SLEEP);
        kup->uc_stack = sau->sau_stack;

where kup is a ucontext_t and the store to kup->uc_stack is faulting.
I can't see a reason for this to happen unless kmem_zalloc returned
badly aligned memory (the %o0 should show that).

Martin