Closed yangzao closed 4 weeks ago
Thu Apr 18 08:05:01 PM MDT 2024 radare2 5.8.9 31711 @ linux-x86-64 birth: git.5.8.8-1074-gbe75b2d9ee 2024-02-13__17:26:56 commit: be75b2d9ee0701582aae047c2a717c4a64d6503e options: gpl -O1 cs:5 cl:2 make Linux x86_64
When using R2Ghidra to decompile a program, a type casted value is recovered as 0 Original code:
0
(long)((((int)(9876543)) % ((int)(l_l))))
Decompiled code:
0 % iStack_20
((int)(9876543)) becomes 0 (iStack_20 corresponds to l_l)
((int)(9876543))
iStack_20
l_l
Files: 3.zip
commands used:
r2 orig_exec aaa pdg @ sym.func_1
the issue is at the line (iStack_20 = (iStack_20 * iStack_20 ...) before the last for loop.
iStack_20 = (iStack_20 * iStack_20 ...
Please, Reopen the ticket in the r2ghidra repo
Environment
Description
When using R2Ghidra to decompile a program, a type casted value is recovered as
0
Original code:Decompiled code:
((int)(9876543))
becomes0
(iStack_20
corresponds tol_l
)Test
Files: 3.zip
commands used:
the issue is at the line (
iStack_20 = (iStack_20 * iStack_20 ...
) before the last for loop.