-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
This test segfaults reliably on v0.13.0:
#[cfg(test)]
mod tests {
use capstone::Capstone;
use capstone::arch::{BuildsCapstone, DetailsArchInsn};
#[test]
fn capstone_segfaults() {
let cs = Capstone::new()
.arm64()
.detail(true)
.mode(capstone::arch::arm64::ArchMode::Arm)
.build()
.unwrap();
let insns = cs.disasm_all(&[0x0c, 0x44, 0x3b, 0xd5], 0).unwrap();
for i in insns.as_ref() {
let id = cs.insn_detail(&i).unwrap();
let ad = id.arch_detail();
let aarch = ad.arm64().unwrap();
println!("{i} (dt: {:?})", aarch.operands().collect::<Vec<_>>());
}
}
}
Metadata
Metadata
Assignees
Labels
No labels