Incorrect number of parameters recognized
rfalke opened this issue · comments
Exe: https://github.com/rfalke/decompiler-subjects/blob/master/from_boomerang/callchain/ia32_elf_by_boomerang/subject.exe
Output:
eax8 = add15(25);
eax9 = add10(eax8, 25);
eax10 = add5(eax9, eax8, 25);
Here add10 and add15 only take one parameter.
The generated code by itself is correct.
However, it probably makes sense to assume that if something looks like being passed as an argument at the call site but not used in the function, and there is no later argument being passed and used in the function, then the first argument being passed is actually not an argument being passed but something else.
In other words, if we see f(a, b, c) at the call site, a and c are used in the function, then a, b, c are actual arguments.
If we see f(a, b, c) at the call site, a is used in the function, then only a is an argument.