From 90fecaa84ff317e30c3339d3edb17b13211e3e64 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 3 Sep 2025 23:16:54 +0200 Subject: asan: Add fixes on absolute/indirect addressing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The check was not being applied on certain conditions. Signed-off-by: Miquel Sabaté Solà --- tests/bare_accesses.s | 4 ++++ tests/expected/bare_accesses.txt | 1 + 2 files changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/bare_accesses.s b/tests/bare_accesses.s index 49628b4..61ae7c6 100644 --- a/tests/bare_accesses.s +++ b/tests/bare_accesses.s @@ -37,3 +37,7 @@ palettes: .byte $0F lda $200 ; asan:ignore +lda $200 + +jmp $8000 +jmp ($8000) diff --git a/tests/expected/bare_accesses.txt b/tests/expected/bare_accesses.txt index 4c14629..0eab60f 100644 --- a/tests/expected/bare_accesses.txt +++ b/tests/expected/bare_accesses.txt @@ -1,4 +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) 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) -- cgit v1.2.3