Re: Alpha: bad unaligned access handling

From: Sean Hunter (sean@dev.sportingbet.com)
Date: Wed Feb 14 2001 - 12:46:56 EST


On Wed, Feb 14, 2001 at 03:38:33PM -0200, Carlos Carvalho wrote:
> Sean Hunter (sean@dev.sportingbet.com) wrote on 14 February 2001 17:26:
> >This is an application problem, not a kernel one. You need to upgrade your
> >netkit.
>
> Yes, I was quite confident of this. However, unaligned traps are a
> frequent problem with alphas. For a looong time we had zsh produce
> lots of it, to the point of making it unusable. Strangely, the problem
> disappeared without changing anything in zsh. It was either a library
> or kernel problem.

Definitely library, I'd think.

>
> >P.S. I wrote a small wrapper to aid in the debugging of unaligned
> >traps, which I'll send to anyone who's interested.
>
> I'd like it!
>

OK, my alpha is a sick bunny at the moment, so I'll have to wait until I get
home (so I can see why I can't ssh to it). What the wrapper does is set some
settings so your program gets sigbus when it generates an unaligned trap, and
then runs your program in gdb so gdb helpfully stops at the line which
generated the trap. It goes without saying you need to build the program in
question with debugging symbols so that you see the code.

You then need to fix the unaligned access. This sometimes requires real alpha
guruhood (Which I do not possess, but Richard Henderson or Michal Jagerman do,
if you need advice), but sometimes simply requires adding __attribute__
((__unaligned__)) to a struct member in a c file.

Sean

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Feb 15 2001 - 21:00:25 EST