-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fallback to x64 directory if running x64 process on win-arm64 apphost #59890
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
Conversation
|
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
|
@ericstj could you please give this a shot? I did some validation but best I have now is x86 emulation on a win-arm64 machine, we should try the real thing (running x64 on a windows arm64 machine). |
No need unloading kernel32 dll Remove unnecessary variable Remove unnecessary else-if branch
|
Do you also plan to fix the mac side of this? It should also have different defaults when run translated. If you think about both together, would it make sense to make this part of the PAL? |
| } | ||
|
|
||
| // Check if we are running an x64 process on a non-x64 windows machine. | ||
| return pProcessMachine != pNativeMachine && pProcessMachine == IMAGE_FILE_MACHINE_AMD64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to be careful about is that pProcessMachine will be IMAGE_FILE_MACHINE_UNKNOWN if this process is not being run as WOW (eg: process = native = x64). That doesn't impact what this method returns, since it intends to communicate not native architecture but I can see that being a place of confusion in the future if this method was refactored. It be more future proof to just check pNativeMachine, this is what we do in the installer.
The reason being, that we've established that the dotnet folder is for the native architecture. Any future non-native architecture will get its own subfolder (if it isn't redirected by the OS).
Use sysctlbyname on macOS
|
@vitek-karas Anything else we need here? |
Should fix #59473.