Vector35 / Vector35/binaryninja-api

Redundant Size Suffixes

Open
#7,991 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Core Core: HLIL Effort: Trivial Impact: Low
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 5.3.9208
  • Edition: Ultimate
  • OS: OSX
  • OS Version: 26.3
  • CPU Architecture: M3

Bug Description:
(There are two bugs here) When using the magic structure creation workflow on the following binary (starting at the malloc call at the end of the first basic block), Binary Ninja creates a double on a field that's used in a four-byte assignment and a 4-byte read. It then renders those reads as var.d.d (which is the bug I'm filing for).

Steps To Reproduce:

  1. Open attached binary
  2. Click s on the malloc near the end of the first basic block
  3. Press s on the rest of the offset annotations
  4. Renders redundant .d's on accesses

Expected Behavior:
We should only show one .d

Screenshots/Video Recording:

Image

Binary:
structure.elf.zip

Additional Information:
When you correct the type to a float from a double, it renders correctly. But I feel like we shouldn't ever display .d.d

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.

Research direction

Open the attached structure.elf.zip in Binary Ninja 5.3.9208 and reproduce the issue through the magic structure creation workflow, starting at the malloc near the end of the first basic block and applying the offset annotations. Inspect how the double type is created for the four-byte assignment and read. Done when those accesses render a single .d rather than var.d.d.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.