WarpProcessor.add_path() crashes

Đang mở
#8,626 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
reverse-engineering

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C++
Star
1.3k
Fork
304
Merge trung bình
2 ngày 20 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Vector35/binaryninja-api

Tất cả issue của Vector35/binaryninja-api

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.