[PATCH v2 1/2] Cygwin: cache IsWow64Process2 host arch in wincap.
Jeremy Drake
cygwin@jdrake.com
Tue Nov 26 22:42:32 GMT 2024
On Tue, 26 Nov 2024, Corinna Vinschen wrote:
> Btw...
>
> We're doing this because nobody being able to debug ARM64 assembler came
> up with a piece of code checking the ntdll assembler code to find the
> address of the fast_cwd_pointer on ARM64.
>
> You seem to have the knowledge and the means to do that, Jeremy.
>
> Any fun tracking this down?
Ha, no, not really. I looked into something similar trying to get Ruby
running on Windows on ARM64, and learned enough to know that how ARM64
encodes addresses is odd enough that I didn't want to dig further ;)
Somebody else did end up implementing getting a private variable (out of
UCRT) by looking at ARM64 assembler, maybe that could work as a starting
point?
https://github.com/ruby/ruby/commit/784fdecc4c9f6ba9a8fc872518872ed6bdbc6670#diff-883ccab70529ab9c4e51fa7b67e178a205940056b21cd123115ebadd8029f50f
(on the Ruby issue, I was of the opinion that it wasn't worth the effort
and periodic breakage to dig out that variable, and I kind of have that
opinion about the FAST_CWD stuff too - I've yet to see any issue from
*not* having it on ARM64, so all of this is probably just to deal with
some rare edge-case).
More information about the Cygwin-patches
mailing list