|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Michal Jaegermann (michal_at_ellpspace.math.ualberta.ca)
Date: Tue Oct 15 2002 - 11:46:43 CDT
On Tue, Oct 15, 2002 at 11:39:36AM -0400, George France wrote:
>
> Alignment traps are not a serious bug but will make the code run significantly
> slower. They are mostly really annoying.
Let me add an example when such trap indictates something more serious
instead of beeing just an instance of a somewhat careless programming.
Cases like that were observed in "real life" instead of beeing
artificially constructed.
A library provides a variable of an 'int' type and another program is
accessing it as 'long'. That bug does not show up on x86 as there
sizeof(int) and sizeof(long) happens to be the same. When this
is not true, like on Alpha but not only, then either you are
scribbling where you should not or you are reading into your program
some unexpected/random values. Direct effects will depend how
important really were these extra bits in a particular situation.
If you are lucky then that library variable is NOT aligned on a long
boundary so attempts to access it as long generate unaligned traps.
These are, of course, symptoms as the real bug is something else.
If you recompile a loader may align library variables differently
and traps may vanish; the bug is still there.
There are other possible bugs which follow roughly the same pattern.
Michal
_______________________________________________
Axp-list mailing list
Axp-list
redhat.com
https://listman.redhat.com/mailman/listinfo/axp-list
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]