asmloader icon indicating copy to clipboard operation
asmloader copied to clipboard

Using rax in x86_64_linux_stub causes a crash if the stack does not have a 16 byte alignment.

Open artur-augustyniak opened this issue 8 years ago • 0 comments

Hey, When calling printf stub uses rax, so this register is nonzero. This causes printf to "see" floating point arguments and starts using SSE. At the same time if the stack does not have the proper alignment asmloader will crash. With my friend we hopefully solved the problem using another register 'r15' in 'vaarg_converter': https://github.com/artur-augustyniak/asmloader/blob/makefile_asmloader/stubs/x86_64_linux_stub.nasm#L60 Code causing crash: https://github.com/artur-augustyniak/asmloader/blob/makefile_asmloader/examples/call_conv64.asm Regards

artur-augustyniak avatar Apr 07 '17 14:04 artur-augustyniak