Subject: Re: unaligned access: how to track ?
To: Manuel Bouyer <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 06/07/2000 09:16:54
Manuel Bouyer <email@example.com> writes:
> While we're at it, it shouldn't be hard to move this to a per-process
> sysctl, isn't it ? Someone told me FreeBSD and True64 has something to set
> this on a per process basis and it looks like a good idea (someone developing
> on an alpha may not be able to turn on the global sysctl :)
> Any takers ?
Certainly we could do this; i'd considered it (and done the kernel
bits) at one point, since DU has had it forever and i saw the feature
there. It's not hard to implement. Somebody could also probably use
at least some of the freebsd code.
However, regardless of 'uac', the right thing to do is to encourage
every sysadmin to set it to 'cause sigbus' by default. Every
unaligned access on the alpha indicates a bug, rather than anything
else. (The only place where i've ever seen it mean anything else was
in binaries translated from mips->alpha, to run under DEC OSF/1 2.x.
For some reason, the translator software was ... broken, and generated
unaligned quad loads in the translated binary, i guess... even those,
really, are indicative of bugs in something.)
he Alpha Arch. Ref. Manual says that general-purposes OSes must do
fixups... so it's not clear that we could make 'sigbus' the default
compiled into the kernel. (if we want to be weasels, though, maybe we
can have the default userland setup set things that way.)
Chris Demetriou - firstname.lastname@example.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.