Subject: | |
From: | |
Reply To: | |
Date: | Sun, 10 Feb 2002 17:22:30 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> Here is a quickie example that I fired up on my hp3000 using Qedit
and
> Stan Sieler's "compile" program (which is a wonderful "make"
> substitute):
>
> /* boundary.c nomodule auxobj libcinit.lib.sys */
> /* Checks for boundary violation */
>
> #include <stdio.h>
>
> int main()
> {
> int SmallArray[5], i;
>
> i = SmallArray[5120000];
>
> printf ("The value of SmallArray[5120000] is %d\n", i);
> return 0;
> }
> So, this is how the hp3000's MPE operating system reacts to
> this example
> of sloppy programming. Does anyone know about the behavior of other
> operating systems? You can simply copy/paste the simple
> program above and try.
WinXP (should be identical on any 32-bit version of Windows):
Unhandled exception at 0x00411a4b in TrapTest.exe: 0xC0000005: Access
violation reading location 0x014b7ec4.
> Hmmm... Would anyone like to change the assignment statement
> to the following
> before compiling and running my little test program on some
> popular OS?
>
> SmallArray[5120000] = i;
Same error except it says "writing" instead of "reading".
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|