`__Unwind_Resume` should be marked `__noreturn`

Open
#6,239 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by investigating how Binary Ninja handles __Unwind_Resume in Mach-O binaries and where its type information comes from. Check the relevant type library or Mach-O analysis path, then verify that the function is treated as __noreturn and no longer produces fall-through decompilation output.

Written by the indexing model from the issue text.

Description

Component: Type Libraries Effort: Low Impact: Low

Version and Platform (required):

  • Binary Ninja Version: 4.3.6541-dev (2a7e8df1)
  • OS: macOS
  • OS Version: 15.1.1
  • CPU Architecture: M1

Bug Description:
Binary Ninja believes that control flow can return from __Unwind_Resume, which is not the case. This results in Binary Ninja thinking execution continues to the line after __Unwind_Resume, which can sometimes be the start of a function. This creates confusing and bloated decompilation output.

Expected Behavior:
__Unwind_Resume should be marked __noreturn so that it doesn't fall through to whatever code comes after the call.

Additional Information:
This issue occurs when working with Mach-O binaries, I'm unsure if it extends to other binary types because I assume the type information is coming from a Mach-O specific type library.

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.