vm-crash1.c 293 B

123456789101112131415161718192021222324
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #if defined(__mips__)
  4. #define INSN_TYPE unsigned int
  5. #define INVAL_INSN 0x0000003f
  6. #else
  7. #error "Please fix this"
  8. #endif
  9. int
  10. main()
  11. {
  12. INSN_TYPE *x = (INSN_TYPE *) main;
  13. *x = INVAL_INSN;
  14. printf("IF THIS PRINTS THE TEST FAILED\n");
  15. exit(1);
  16. }