Vector35 / Vector35/binaryninja-api
printf style variadic functions wrong argument order when vector registers used
Open
@D0ntPanic is already working on this.
Since Dec 3, 2024.
Component: Core
Core: Calling Convention
Effort: Low
Impact: Low
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
Version and Platform (required):
- Binary Ninja Version: 4.2.6455
- OS: macOS
- OS Version:
- CPU Architecture: x86_64, but likely others
Bug Description:
Decompiling the following code:
#include <stdio.h>
main(){
printf("%d %d %g %g %g %g %d %d",12,12,0.12,0.13,0.14,0.15,10,9);
}
Results in:
zmm0 through zmm3 shouldn't be at the end.
This might require special casing handling of float values in printf...
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
Compile sample code, drop binary into Binary Ninja, observe slightly wrong decompilation..
Expected Behavior:
Format string args should match the order specified in the format string itself.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.