Vector35 / Vector35/binaryninja-api

Incorrect possible value calculated as sum of unsigned ranges

Open
#5,339 1 comment 3 reactions 1 assignee View on GitHub

@negasora is already working on this.

Since May 26, 2025.

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

Description

On 4.1.5182-dev

a.txt

image

>>> current_il_instruction.get_possible_reg_values(bv.arch.get_reg_index('rax'))
<unsigned ranges: [<range: 0x0 to 0x1c, step 0x4>]>
>>> current_il_instruction.get_possible_reg_values(bv.arch.get_reg_index('rdx'))
<unsigned ranges: [<range: 0x0 to 0x7>]>
>>> current_il_instruction.get_possible_reg_values_after(bv.arch.get_reg_index('rax'))
<unsigned ranges: [<range: 0x0 to 0x3>]>

The result should be <unsigned ranges: [<range: 0x0 to 0x23>]>

This looks like it's because rax_3#5 is internally UndeterminedValue but you can hover and see we know the correct value for it. Setting the value of rax_3#5 manually to {0 : 0x1c : 4} fixes this.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.