From 6894b01b22e848b5fdbb2fafae88e9459232ced2 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 5 Feb 2026 18:53:20 +0100 Subject: asan: don't complain on arithmetic with addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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à --- tests/bare_accesses.s | 3 ++- tests/expected/bare_accesses.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') 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) -- cgit v1.2.3