How to trap unaligned accesses on Ultrix/MIPS?

Chris Siebenmann cks at hawkwind.utcs.toronto.edu
Tue Feb 26 14:11:37 AEST 1991


 Unfortunately, Ultrix currently (as far as I'm aware) provides no
support for making your programs always dump core when they do
unaligned references that the kernel has to fix up. Personally, I think
this is a gaping misfeature, and I wish DEC had fixed their kernel and
uac to support this several releases ago (maybe then vendors would stop
fixing third party software that fills up our error logs with "Fixing
up unaligned references" messages).

 If you have kernel source, it appears to be a relatively simple fix to
always make things dump core when this happens (or to make it dump core
conditional on whether or not the message is printed); see trap.c,
around line 368 in the Ultrix 4.0 sources. It might be possible to
binary patch a kernel to always dump core on such fixups; you'd need to
NOP out a C break statement.

 Of course, who knows how much Ultrix software would start dumping core
if you did this; patch at your own peril.

--
    ported program:	  a program which takes constant or increasing
			  effort to port to each new machine.
    portable program: a program which takes less effort to port to
		      each new machine.
cks at hawkwind.utcs.toronto.edu	           ...!{utgpu,utzoo,watmath}!utgpu!cks



More information about the Comp.unix.ultrix mailing list