Skip to content

[WARP] to_bn_calling_convention panics when BNGetArchitectureDefaultCallingConvention returns None #8181

@sentry

Description

@sentry

Sentry Issue: BINARYNINJA-82

SIGABRT / SI_TKILL / 0x0: Fatal Error: SIGABRT / SI_TKILL / 0x0
  File "mod.rs", line 368, in std::sys::pal::unix::abort_internal
  File "process.rs", line 2500, in std::process::abort
  File "rt.rs", line 57, in __rustc::rust_panic
  File "panicking.rs", line 859, in std::panicking::panic_with_hook
  File "panicking.rs", line 700, in std::panicking::panic_handler::{{closure}}
...
(42 additional frame(s) were not displayed)

@bdash says:

See

pub fn to_bn_calling_convention<A: BNArchitecture>(
arch: &A,
calling_convention: &CallingConvention,
) -> BNRef<BNCallingConvention> {
for cc in &arch.calling_conventions() {
if cc.name().as_str() == calling_convention.name {
return cc.clone();
}
}
arch.get_default_calling_convention().unwrap()
}
. I'm not sure under what conditions this can happen.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions