-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MSVC][x86] Failed to build with error C2488: 'naked' can only be applied to non-member function definitions #104460
Comments
Tagging subscribers to this area: @hoyosjs |
This was touched in #102834, but it was already 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: runtime/src/coreclr/debug/ee/debugger.cpp Lines 13918 to 13960 in a7efcd9
It just pushes and pops 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 |
runtime/src/coreclr/debug/di/rsthread.cpp Lines 3879 to 3881 in a7efcd9
|
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.
The text was updated successfully, but these errors were encountered: