aboutsummaryrefslogtreecommitdiff
path: root/tests/expected/runrom/overflow-data-indexing.txt
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-10-09 21:45:05 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-10-09 21:45:05 +0200
commitf6df4314945c1d37d314a7c88553b97b23c748e9 (patch)
tree20e71c89c25f469a83c52528dfdfe0ed71a8c3e1 /tests/expected/runrom/overflow-data-indexing.txt
parentaa5174fc055dc66e78a8aa7030c018e43cf588a1 (diff)
downloadtools.nes-f6df4314945c1d37d314a7c88553b97b23c748e9.tar.gz
tools.nes-f6df4314945c1d37d314a7c88553b97b23c748e9.zip
vnf,runrom: detect bad data access
This includes detection for: - Stack underflows (it was theoretically already there but it had never been properly tested). - Load/store out of bounds for a given variable known via the .nasm/ directory. - Load out of bounds on a set of data referenced via a raw label (see commit aa5174fc055d ("xixanta: Add an hint for the ending of data labels")). Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'tests/expected/runrom/overflow-data-indexing.txt')
-rw-r--r--tests/expected/runrom/overflow-data-indexing.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/expected/runrom/overflow-data-indexing.txt b/tests/expected/runrom/overflow-data-indexing.txt
new file mode 100644
index 0000000..469a265
--- /dev/null
+++ b/tests/expected/runrom/overflow-data-indexing.txt
@@ -0,0 +1,10 @@
+<start> PC: $801B, cycles: 7, registers: [a: $00, x: $00, y: $00, sp: $FD], status: ----I--
+ldx #$00 PC: $801D, cycles: 9, registers: [a: $00, x: $00, y: $00, sp: $FD], status: ----IZ-
+lda $8028, x PC: $8020, cycles: 13, registers: [a: $00, x: $00, y: $00, sp: $FD], status: ----IZ-
+clc PC: $8021, cycles: 15, registers: [a: $00, x: $00, y: $00, sp: $FD], status: ----IZ-
+adc #$04 PC: $8023, cycles: 17, registers: [a: $04, x: $00, y: $00, sp: $FD], status: ----I--
+tax PC: $8024, cycles: 19, registers: [a: $04, x: $04, y: $00, sp: $FD], status: ----I--
+
+@:
+lda $8028, x PC: $8024, cycles: 19, registers: [a: $04, x: $04, y: $00, sp: $FD], status: ----I--
+error: out of bounds: indexed access to $802C falls out of 'bad_rom_data_indexing::data' ($8028-$802C; bounded inclusively below and exclusively above)