'create struct members referenced' breaks when structure size is greater than padding threshold (0x10000)

Open
#5,253 3 comments 1 reaction 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 reproducing the problem with sample.zip in the Binary Ninja UI: press “s” on x0_7 and x0_6 and inspect the created structure and __padding offset. Trace the allocator path that creates referenced struct members, focusing on the 0x400 and 0x10000 size thresholds. Done means structures larger than the threshold preserve the actual padding instead of creating an invalid offset.

Written by the indexing model from the issue text.

Description

Component: UI Effort: Low Impact: Low

Structures over 0x400 aren't properly created when using "s" on the call of an allocator:

Note this is especially problematic because it's extremely difficult using the UI to turn the invalid __padding offset back into the actual padding.

(just press "s" on x0_7 and x0_6 in the attached)

Screenshot 2024-04-09 at 22 15 55

sample.zip

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.