Skip to content

[Rust] BNUpdateAnalysisAndWait hangs after BNLoadFilename(_, updateAnalysisAndWait=false, _) #8165

@jrozner

Description

@jrozner

Version and Platform (required):

  • Binary Ninja Version: dev
  • Edition: Ultimate
  • OS: linux
  • OS Version: 24.04
  • CPU Architecture: x64

Bug Description:
The two-step "load without analyzing, then analyze separately" pattern hangs forever on at least some ELFs. BNLoadFilename(path, updateAnalysisAndWait=false, …) returns successfully, but a subsequent call to BNUpdateAnalysisAndWait never returns, and BNGetAnalysisProgress reports Initial indefinitely. The single-call form BNLoadFilename(path, updateAnalysisAndWait=true, …) analyzes the same file to completion in seconds.

Steps To Reproduce:

fn main() {
  let session = binaryninja::headless::Session::new().unwrap();

  // Single-call form: completes in seconds, BV ends up fully analyzed.
  let bv = session
      .load_with_options("/path/to/bin", true, Some("{}"))
      .expect("load failed");
  // bv.analysis_progress() == Idle here.

  // Two-step form: hangs indefinitely on the same file, never leaves Initial.
  let bv = session
      .load_with_options("/path/to/ioncube_loader_lin_8.3.so", false, Some("{}"))
      .expect("load failed");
  assert!(matches!(
      bv.analysis_progress(),
      binaryninja::binary_view::AnalysisProgress::Initial
  ));
  bv.update_analysis_and_wait(); // never returns
}

*Expected Behavior:
bv.update_analysis_and_wait should finish

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions