Newsgroups: comp.windows.ms.programmer
Path: utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
From: bonneau@hyper.hyper.com (Paul Bonneau)
Subject: Re: UAE's - how are they detected
Message-ID: <1991May28.173139.8139@hyper.hyper.com>
Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
Organization: HyperCube Inc.
References: <1991May25.054957.1151@mnemosyne.cs.du.edu>
Date: Tue, 28 May 1991 17:31:39 GMT

In article <1991May25.054957.1151@mnemosyne.cs.du.edu>
ebergman@isis.cs.du.edu (Eric Bergman-Terrell) writes:
>
>I understand that an UAE is raised when (among other conditions), a program
>has written to an address outside of its address space.
>
>How is this detected?  Furthermore, is every "wild write" caught in this
>manner?  If no, what sort of mayhem goes undetected?
>
I think I can answer for the 386 in enhanced mode.  Not so
sure about 286 or standard mode.  Anyway...

The "wild write" you speak of will generate an interrupt 13,
Generae Protection exception.  It is generated by the memory
management hardware in the chip.  The interrupt handler for
this will generate the UAE MessageBox and terminate the app.

Only thos writes outside the bounds of a selector can be
detected.  Once we have win32 (now called Windows 4
apparently) where an application will have a virtual address
space of several gigabytes, wild writes will be much harder
to detect.  One of the (few) benefits of the 386's segmented
architecture is that it *does* make memory trashing easier
to find.

cheers - Paul Bonneau.

