WarpProcessor.add_path() crashes

Aperta
#8,626 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start by running the provided WarpProcessor script and isolate whether the crash occurs in add_path() or proc.start(). Compare that path with the working add_binary_view flow and use the reported exit behavior as the regression check; done means add_path('/bin/ls') completes without a segmentation fault and produces a valid WarpFile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Component: WARP

Version and Platform (required):

  • Binary Ninja Version: 6.1.10601
  • Edition: Ultimate
  • OS: MacOS
  • OS Version: 27
  • CPU Architecture: M3 Pro

Bug Description:
Running add_path() crashes script.

import sys, binaryninja
from binaryninja.warp import WarpProcessor

print("start", flush=True)
proc = WarpProcessor(worker_count=1)
proc.add_path('/bin/ls')
print("added path, starting", flush=True)
wf = proc.start()
print("RESULT WarpFile:", wf, flush=True)
sys.exit(0)

Run as python3 script.py > out.log 2>&1; echo $?.

$ python3 warp_test2.py > warp_test2.out 2>&1
$ echo $?
139

Exit code 139 = SIGSEGV (128 + 11). Output file contains only:

start
added path, starting
  • i.e. it crashes somewhere inside proc.start() (or possibly add_path itself lazily deferring work into start()), with no Python traceback at all, no exception, just a hard segfault of the whole interpreter.

The equivalent flow using add_binary_view instead of add_path, i.e. doing the load/analyze step manually in Python and only handing WarpProcessor an already-analyzed BinaryView, works fine and was verified multiple times, including batching multiple views into one processor (confirmed dedup: 3 binaries in, 1 merged 2-chunk .warp out):

import binaryninja
from binaryninja.warp import WarpProcessor

proc = WarpProcessor(worker_count=1)
bvs = []
for path in ['/bin/ls', '/bin/cat', '/bin/echo']:
    bv = binaryninja.load(path)
    bv.update_analysis_and_wait()
    proc.add_binary_view(bv)
    bvs.append(bv)

wf = proc.start()          # <-- WarpFile, no crash
data = bytes(wf.to_data_buffer())
for bv in bvs:
    bv.file.close()

This exits 0, prints a valid WarpFile repr, and produces real .warp bytes.

Lingua principale
C++
Stelle
1.3k
Fork
304
Merge medio
2g 20h
PR unite (30g)
10

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Vector35/binaryninja-api

Tutte le issue di Vector35/binaryninja-api

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.