Skip to content

Commit

Permalink
Add a test for executing at bad addresses.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Feb 9, 2021
1 parent 0a5453f commit 1047400
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/cpu/crash/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TARGETS = crash_read_u32 crash_write_u32 crash_read_f32 crash_write_f32
TARGETS = crash_read_u32 crash_write_u32 crash_read_f32 crash_write_f32 crash_bad_execaddr

COMMON_DIR = ../../../common
include $(COMMON_DIR)/common.mk
12 changes: 12 additions & 0 deletions tests/cpu/crash/crash_bad_execaddr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <common.h>
#include <pspkernel.h>

#include <stdint.h>

typedef void (*func_ptr)();

int main(int argc, char *argv[]) {
volatile func_ptr bad_address = (func_ptr)0xAC;
bad_address();
return 0;
}
Binary file added tests/cpu/crash/crash_bad_execaddr.prx
Binary file not shown.

0 comments on commit 1047400

Please sign in to comment.