Skip to content

Commit 14ec5df

Browse files
committed
test(patcher): gate x64-only property_device alternate-form tests off x86
The two alternate-form-via-Jcc-target tests feed x64 synthetic machine code and the analyzer decodes with the host arch_bits(), so they fail under target_arch=x86 (i686 CI test job). Gate them with cfg(not(target_arch = "x86")). Test-only change; shipped binaries are unchanged (v0.3.0 release artifacts stand).
1 parent 20fb1dc commit 14ec5df

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

crates/patcher/src/analyze/property_device.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ mod tests {
488488
}
489489

490490
// --- Alternate form via Jcc target: SHR 0x0c + AND 7 ---
491+
// x64-only: the synthetic body is x64 machine code and the analyzer decodes
492+
// with the host's `arch_bits()`, so this is gated off the x86 host target.
493+
#[cfg(not(target_arch = "x86"))]
491494
#[test]
492495
fn alternate_form_via_jcc_target() {
493496
// Primary scan must NOT match (use a different shift before the Jcc), so
@@ -572,6 +575,8 @@ mod tests {
572575
}
573576

574577
// --- patch_primary=false still lets the alternate form patch ---
578+
// x64-only: synthetic x64 body decoded with the host `arch_bits()`.
579+
#[cfg(not(target_arch = "x86"))]
575580
#[test]
576581
fn alternate_still_applies_when_primary_suppressed() {
577582
// Primary SHR(0x0b)+AND first, then a Jcc to an alternate site. With

0 commit comments

Comments
 (0)