diff --git a/objdiff-core/src/arch/x86.rs b/objdiff-core/src/arch/x86.rs index 004a337..d609859 100644 --- a/objdiff-core/src/arch/x86.rs +++ b/objdiff-core/src/arch/x86.rs @@ -181,6 +181,12 @@ impl Arch for ArchX86 { branch_dest, }); } + // Strip trailing int3 instructions (alignment padding) for x64 + if matches!(self.arch, Architecture::X86_64) { + while out.last().is_some_and(|i| i.opcode == iced_x86::Mnemonic::Int3 as u16) { + out.pop(); + } + } Ok(out) }