mao@postgres.berkeley.edu (Mike Olson) (03/18/90)
we're running Ultrix Worksystem V2.0 (Rev. 7) on decstation 3100's here. we're porting code developed on other systems, and have pretty consistent problems with alignment assumptions that were made in the original code. we want to fix those now. when a program makes a misaligned memory reference, the kernel prints the message Fixed up unaligned data access for pid XXXXX (...) at pc 0x40ae14 and permits the program to continue running. there's clearly some sort of exception handler taking care of this. i'd like that exception handler to behave differently. rather than fixing the ref, i'd like it to dump core and let me deal with the problem myself. is this configurable? i'm surprised that this behavior is the default; it seems to me pretty easy to guess wrong when you're twiddling pointers on behalf of a user program at runtime. i know that i could fire up the program under dec's dbx and use stopi, but that's pretty messy if the alignment is only occasionally bad at a particular point in the code. if anyone knows how to defeat this behavior, i would appreciate hearing about it. mike olson postgres research group uc berkeley mao@postgres.Berkeley.EDU
michaud@decvax.dec.com (Jeff Michaud) (03/20/90)
> is this configurable? i'm surprised that this behavior is the default; it > seems to me pretty easy to guess wrong when you're twiddling pointers on > behalf of a user program at runtime. The idea is you don't want applications core dumping (ie. become unusable) in a production environment. Even in a development environment, all the applications you are running you are most likely not going to have source access to. As such, it's better to allow programs to continue to run since they are most likely functioning properly even though they are taking a performance hit for every unaligned access. /--------------------------------------------------------------\ |Jeff Michaud michaud@decwrl.dec.com michaud@decvax.dec.com| |DECnet-ULTRIX #include <standard/disclaimer.h> | \--------------------------------------------------------------/
jtkohl@MIT.EDU (John T Kohl) (03/20/90)
In article <23185@pasteur.Berkeley.EDU> mao@postgres.berkeley.edu (Mike Olson) writes: > when a program makes a misaligned memory reference, the kernel prints the > message > Fixed up unaligned data access for pid XXXXX (...) at pc 0x40ae14 > and permits the program to continue running. there's clearly some sort of > exception handler taking care of this. i'd like that exception handler to > behave differently. rather than fixing the ref, i'd like it to dump core > and let me deal with the problem myself. > is this configurable? Not quite in the way you are asking, but you can modify the printing/non-printing of the message; see the man page for uac(1) (Unaligned Access Message Control). -- John Kohl <jtkohl@ATHENA.MIT.EDU> or <jtkohl@Kolvir.Brookline.MA.US> Digital Equipment Corporation/Project Athena (The above opinions are MINE. Don't put my words in somebody else's mouth!)
steve@fnord.umiacs.umd.edu (Steve D. Miller) (03/22/90)
I disagree. On any other machine, programs that do things that should make them core dump actually do core dump. This is the hardware's way of telling you to clean up your code. (-: The thing that worries me a lot is that some vendors might ship software that does the equivalent of 'uac p 0' before it starts to run. I'd much rather that they spent their time fixing their problems. Oh well, I guess this is a religious issue. -Steve -- Spoken: Steve Miller Domain: steve@umiacs.umd.edu UUCP: uunet!mimsy!steve Phone: +1-301-454-1808 USPS: UMIACS, Univ. of Maryland, College Park, MD 20742