Typelib.finalize should consider throwing an exception on failure w/ failure info in the exception

Open
#5,739 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Start by locating the TypeLibrary.finalize API and reviewing how its bool result and first failure are currently exposed through Binary Ninja's log system. Define the failure-information and exception behavior before assessing the PyCharm reproduction; done should make finalize failures observable without relying on concealed log output.

Written by the indexing model from the issue text.

Description

Component: Type Libraries

What is the feature you'd like to have?
TypeLibrary.finalize currently returns a bool on success or failure. This is adequate enough when wrapped properly but contains multiple footguns.

  • If you "run the script wrong", i.e. in a way that would conceal binaryninja's log output, and you aren't checking that bool, you have zero idea the typelib even failed, and it will function as if it did not fail. This can be reproed by running a script in PyCharm w/ default settings (Run in Terminal off)
  • Binaryninja will log the first error through its log system and fail early. This is nice for avoiding log spew, but conceals the scope of any problems
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.