binaryninja-api
binaryninja-api copied to clipboard
Incorrect possible value calculated as sum of unsigned ranges
On 4.1.5182-dev
>>> 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.