Open NEIL-smtg opened 2 months ago
Tagging subscribers to this area: @hoyosjs See info in area-owners.md if you want to be subscribed.
This was touched in #102834, but it was already naked
then.
Does it make sense to port the naked function to asm now?
Does it make sense to port the naked function to asm now?
Yes. Inline assembler has always been a factory for problems. We try to avoid inline asm for any new code.
Well I want to understand more about this specific function:
It just pushes and pops ebp
frame around the call to GenericHijackFuncHelper
. What's the requirement around this?
When written as ordinal function, it compiles to the same code of win-x64:
call GenericHijackFuncHelper
jmp ExceptionNotForRuntime
On win-arm64, the return-address saving is around the two function calls:
str lr,[sp,#-0x10]!
bl GenericHijackFuncHelper
bl ExceptionNotForRuntime
ldr lr,[sp],#0x10
ret
Description
Note: To reproduce this, you'll need wait for VS 2022 17.12 Preview or later version to ship which will contain this change.
Recently, we have been building this project using the latest build of MSVC, and we have encountered the following error:
Complete build log: Build.log
Reproduction Steps
Expected behavior
It compiles.
Actual behavior
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
This is the narrowed down repro, test.cpp:
repro command:
For current version, you will only ger error C2488 on line 2 and 4. For the upcoming version of VS, the last line will be also getting the error C2488.