-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Restructuring] Side effects #19
Labels
Comments
/cib |
Branch issue-19-_Restructuring_Wrong_Value_in_Condition created! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
When we restructure a CFG into an AST, we transform each condition into a symbol. Now, each node of a region gets its reaching condition assigned, thus a reaching condition can occur multiple times.
Consider the following example:
![rc-Problem-126](https://user-images.githubusercontent.com/7224664/149172959-cd1bae81-3848-44a0-ad7e-0cb10d285093.jpg)
The putout is incorrect because the value of
a
changes and afterward, we have a check with the old value.An correct output would, for example be:
How to reproduce?
A binary where this problem also occurs is test_switch.zip
test18
.The C-code is:
and the output is:
When entering the number 1, the function prints "Monday", "Tuesday", and "the number is 501".
But the decompiled function, with input 1 prints "Monday", "Invalid input! Please enter week number between 1-7.", and "the number is 501".
Affected Binary Ninja Version(s)
Version 2.4.2846
The text was updated successfully, but these errors were encountered: