os161-1.99
 All Data Structures
vm-crash1.c
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 
00004 #if defined(__mips__)
00005 #define INSN_TYPE unsigned int
00006 #define INVAL_INSN  0x0000003f
00007 #else
00008 #error "Please fix this"
00009 #endif
00010 
00011 
00012 int
00013 main()
00014 {
00015 
00016         INSN_TYPE *x = (INSN_TYPE *) main;
00017         *x = INVAL_INSN;
00018 
00019         printf("IF THIS PRINTS THE TEST FAILED\n");
00020         exit(1);
00021 }
00022 
00023 
00024 
 All Data Structures