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à --- lib/xixanta/src/assembler.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/xixanta/src/assembler.rs b/lib/xixanta/src/assembler.rs index 507f5e1..d5dc5fa 100644 --- a/lib/xixanta/src/assembler.rs +++ b/lib/xixanta/src/assembler.rs @@ -2749,9 +2749,7 @@ impl<'a> Assembler<'a> { expanded_from: self.macro_context.clone(), }); } - if !matches!(node.value.value.as_str(), "jmp" | "jsr") { - self.asan_check_arm(evaluated_node, &val)?; - } + self.asan_check_arm(evaluated_node, &val)?; Ok((AddressingMode::Indirect, val)) } }, -- cgit v1.2.3