Vector35 / Vector35/binaryninja-api

Stop promoting type alignment by default

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

Nobody has claimed this yet.

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

Description

What is the feature you'd like to have?
There are some situations where we promote type alignment for a structure automatically. We should not do this.

Is your feature request related to a problem?
This can be problematic in cases where it causes padding bytes to be hidden. Because the padding bytes are hidden, you can't easily define a new member there without also undefining the prior member(s) to get the padding bytes to show up again.

Are any alternative solutions acceptable?
We could also just not hide the padding bytes at all (or provide an option to always show them). But, it's very nice to have them hidden in contexts where you have set the alignment and the fact that alignment can change on you without explicitly setting it feels strange and unexpected.

Additional Information:
This was reported by a customer today in a user feedback meeting we had with them.

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

Start by locating the C++ API code that promotes type alignment for structures and inspect how that behavior affects padding-byte visibility. The change is done when alignment is no longer promoted by default, while explicitly configured alignment can still provide the existing padding-hiding behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, reverse-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.