Closed pfactum closed 2 years ago
Adding this:
OPTION FRAMEPRESERVEFLAGS:ON
OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE
to the beginning of the file works around the issue.
7-Zip 21.06 compiled with UASM v2.52 -> no longer appears segfaults on benchmark with or without -mmt1 / -mmt2
The suggested way to disable the automatic prologue/epilogue generation is correct. I'm double checking if the sub/add rsp pair are still incorrectly generated regardless. Stack should always be aligned 16.
I've tested a number of scenarios with argument counts and register preservations across calls with USES and it appears ok to me. I suspect this might have been a combination of the code in question doing it's own stack-ops at the same time as UASM trying to implement smart stack management. Will close unless an issue with Nix stack alignment comes up again.
Hello.
While building 7-zip 21.03 with uasm 2.52 it was discovered that uasm generates extra
sub $0x8,%rsp / add $0x8,%rsp
pair for one of the functions, and the 7-zip developer thinks this may lead to the reported 7-zip crash.The 7-zip source code contains the
Asm/x86/LzFindOpt.asm
file in question.Could you please suggest why
sub/add
pair was added here and how to disable it?Thanks.