You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
AArch64 condition codes vs and vc display as false/true in the decompiler when both operands are the same. Some other float comparisons appear to break under certain conditions but I'm not sure how to reproduce them in an isolated environment.
To Reproduce
Compile a simple program like the following:
Then analyze the binary in Ghidra. The decompiler will output return false; for the first function and return true; for the second.
Expected behavior
It should either show the explicit comparison (like param_1 != param_1) or use NaN for these specific cases (maybe something like isnan(param_1).
Screenshots
The weird example I don't know how to reproduce:
Environment (please complete the following information):
OS: Windows 10 Home 22H2
Java Version: 21.0.4
Ghidra Version: 11.3 Release
Ghidra Origin: Official GitHub Repository
The text was updated successfully, but these errors were encountered:
There is an option controlling how much to ignore NaN operations in the decompiler output. You can change it via
Edit ->Tool Options-> Decompiler->Analysis>NaN operations. Does changing it help?
Looks like the pcode for fmcp is not handling the NaN case. Should be an easy fix. Once the pcode has been updated the ignore nan option should behave as expected.
Describe the bug
AArch64 condition codes vs and vc display as false/true in the decompiler when both operands are the same. Some other float comparisons appear to break under certain conditions but I'm not sure how to reproduce them in an isolated environment.
To Reproduce
Compile a simple program like the following:
Then analyze the binary in Ghidra. The decompiler will output
return false;
for the first function andreturn true;
for the second.Expected behavior
It should either show the explicit comparison (like
param_1 != param_1
) or use NaN for these specific cases (maybe something likeisnan(param_1)
.Screenshots
The weird example I don't know how to reproduce:
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: