aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-02-05 18:53:20 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-02-06 14:05:37 +0100
commit6894b01b22e848b5fdbb2fafae88e9459232ced2 (patch)
tree6bb08be6754e4d481489b7cb01d50c6e706d4ba9 /tests
parentd36e0de313aa65192eba108dd75135991a42685e (diff)
downloadtools.nes-6894b01b22e848b5fdbb2fafae88e9459232ced2.tar.gz
tools.nes-6894b01b22e848b5fdbb2fafae88e9459232ced2.zip
asan: don't complain on arithmetic with addresses
This was already the case for plain addresses, but it was not being considered in the case of an arithmetic operation. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bare_accesses.s3
-rw-r--r--tests/expected/bare_accesses.txt2
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/bare_accesses.s b/tests/bare_accesses.s
index 61ae7c6..cebdc10 100644
--- a/tests/bare_accesses.s
+++ b/tests/bare_accesses.s
@@ -32,9 +32,10 @@ lda zp_used - 1
ldx #0
lda palettes, x
+lda palettes + 1, x
palettes:
- .byte $0F
+ .byte $0F, $FF
lda $200 ; asan:ignore
lda $200
diff --git a/tests/expected/bare_accesses.txt b/tests/expected/bare_accesses.txt
index 0eab60f..676723f 100644
--- a/tests/expected/bare_accesses.txt
+++ b/tests/expected/bare_accesses.txt
@@ -1,5 +1,5 @@
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)
-warning: accessing a memory region without using a variable (bare_accesses.s: line 40)
+warning: accessing a memory region without using a variable (bare_accesses.s: line 41)
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)