Emitting `unimplemented` for indirect jumps and returns interferes with analysis

Open
#1,511 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start by tracing how the lifter API handles unimplemented alongside analysis API emissions for indirect branches and function returns. Reproduce the behavior with the dummy lifter described in the issue, then verify that those explicit control-flow outcomes are preserved rather than replaced by fallthrough; unimplemented; undefined is the documented workaround to compare against.

Written by the indexing model from the issue text.

Description

Effort: Low Impact: Low

Suppose I am developing a new architecture. At first I use a dummy lifter that just emits unimplemented for everything. This works perfectly fine in every case, except for indirect jumps and returns. In that case, even though I correctly emit an indirect branch or function return via the analysis API, the lifter API overrides it, and the instruction falls through.

This is one of the few major papercuts when developing a new lifter. I know I wasted hours on it, forgot it's an issue, then wasted hours again. Please adjust the API so that this isn't an issue!


If you're hitting this problem, emitting unimplemented; undefined is a workaround.

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.