`__attr` attributes on pointer types are lost on save/load
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
- 55/100
Hướng nghiên cứu
Start with the Python reproducer in the issue: parse int * __attr("key", "val"), add the type to a TypeArchive, and compare it before and after retrieving it. Trace how pointer and reference type attributes are serialized and restored, then find the relevant tests for type archives. Done means the archived type retains its __attr and the reproducer passes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version and Platform (required):
- Binary Ninja Version: 6.1.10984-dev
- Edition: Commercial
- OS: macOS
- OS Version: 27.0.1 (26A434)
- CPU Architecture: arm64
Bug Description:
In various cases when saving and loading, __attr attributes are lost on pointer and reference types.
Steps To Reproduce:
Run the following reproducer. (This uses a TypeArchive for simplicity, but the same behavior occurs when when defining a type in a database and saving and loading.)
from binaryninja import Platform, TypeParser, TypeArchive
platform = Platform['linux-x86_64']
(qnt, ty), errors = TypeParser.default.parse_type_string('int * __attr("key", "val")', platform)
assert len(errors) == 0
archive = TypeArchive.create('test.bnta', platform)
archive.add_type('test', ty)
print('before archive:', ty)
print('after archive:', archive.get_type_by_name('test'))
Output:
before archive: int32_t* __attr("key", "val")
after archive: int32_t*
Expected Behavior:
The __attr should still be there after archiving.
Additional Information:
-
The bug doesn't occur if you replace
int *with, say,int(or apparently any type other than a pointer or reference). -
This bug was discovered by AI but I vouch for the report.
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Vector35/binaryninja-api
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
Vector35/binaryninja-api#8715 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Vector35/binaryninja-api#8714 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Vector35/binaryninja-api#8713 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
Vector35/binaryninja-api#8689 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Component: Python API
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Vector35/binaryninja-api#8649 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của Vector35/binaryninja-api
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
ESPresense/ESPresense#2680 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 75/100
stew675/llama-cpp-rdna-boosts#348 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Documentation: Add comprehensive newcomer onboarding guide, project structure, and local usage to READMECó thể đã có người làm @Ash-Blanc đã nhận hôm nay. Đang mởarea/other status/bot-triaged status/need-triage
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 85/100
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày