From 394ccffc5a3f7a6fb791eaa87767cf1bba34199c Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 11 Feb 2026 17:13:09 +0100 Subject: asan: Fix validation on indirect jumps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There were two bugs involved at the same time. First, for some reason, the "matches" clause was negated, which defeats the purpose of the check. This even resulted in a bad test run which was accepted because I just did not caught it before. Second, pure indirect addressing mode is only available for the "jmp" instruction. Hence, there's no need for that "matches" at all, and even less to filter that based on "jsr" which doesn't even implement this addressing mode. Signed-off-by: Miquel Sabaté Solà --- tests/expected/bare_accesses.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/expected') diff --git a/tests/expected/bare_accesses.txt b/tests/expected/bare_accesses.txt index 676723f..35db410 100644 --- a/tests/expected/bare_accesses.txt +++ b/tests/expected/bare_accesses.txt @@ -1,5 +1,6 @@ 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 41) +warning: accessing a memory region without using a variable (bare_accesses.s: line 44) 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