aboutsummaryrefslogtreecommitdiff
path: root/tests/expected/bare_accesses.txt
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-09-03 19:08:05 +0200
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-09-03 20:45:54 +0200
commit9dcbf460ff692c049e4d327afcbdbc39ba4e8c65 (patch)
tree1d96e2bccc566a3092768da691e7ca47881880de /tests/expected/bare_accesses.txt
parenta3989fb9c5424f2f93c67669102ee8cb61303c24 (diff)
downloadtools.nes-9dcbf460ff692c049e4d327afcbdbc39ba4e8c65.tar.gz
tools.nes-9dcbf460ff692c049e4d327afcbdbc39ba4e8c65.zip
Validate that memory access is done via variables
The address sanitizer is now able to detect whenever in an instruction a memory access is done without using variables. This is now detected for all instructions except for branching, which falls outside of this scope. Moreover, simple arithmetics is allowed and bounds are checked for simple cases. That being said, more involved bound checks should be done with other tools (e.g. emulators). Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'tests/expected/bare_accesses.txt')
-rw-r--r--tests/expected/bare_accesses.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/expected/bare_accesses.txt b/tests/expected/bare_accesses.txt
new file mode 100644
index 0000000..4c14629
--- /dev/null
+++ b/tests/expected/bare_accesses.txt
@@ -0,0 +1,4 @@
+warning: accessing a memory region without using a variable (bare_accesses.s: line 22)
+warning: accessing a memory region without a proper name ('whatever') (bare_accesses.s: line 23)
+error: out of bounds memory access for 'zp_used' ($00-$01) (bare_accesses.s: line 27)
+error: out of bounds memory access for 'zp_used' ($00-$01) (bare_accesses.s: line 28)