Skip to content
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

ruby: broken in CLANG32 on Windows 11/Server 2022 #10896

Closed
jeremyd2019 opened this issue Mar 3, 2022 · 3 comments · Fixed by #10898
Closed

ruby: broken in CLANG32 on Windows 11/Server 2022 #10896

jeremyd2019 opened this issue Mar 3, 2022 · 3 comments · Fixed by #10898

Comments

@jeremyd2019
Copy link
Member

jeremyd2019 commented Mar 3, 2022

yeah, ruby is broken there, just running it gives the same error. Downgrading it doesn't help.

Originally posted by @lazka in #10878 (comment)

Results of investigation:
https://github.com/ruby/ruby/blob/v3_0_3/win32/win32.c#L2591 😱

wow, yeah, ucrtbase!_isatty disassembly is majorly different on win11
I think the code would actually still work, except they no longer use pop ebp as the last instruction before ret, but rather leave
so the pattern no longer finds the end of the function
but given the code is majorly changed, there's a chance the internal struct has changed too
but this is not limited to us, either. 32-bit upstream ruby should be broken on Windows 11 too. Maybe there's not much use of that?

@lazka
Copy link
Member

lazka commented Mar 3, 2022

I've filed a bug upstream: https://bugs.ruby-lang.org/issues/18605

@jeremyd2019
Copy link
Member Author

jeremyd2019 commented Mar 3, 2022

There's also a high likelihood this will break on Windows on ARM. In addition to requiring new patterns to match the ARM64 and ARM32 assembly if built for ARM, the x64/x32 running under emulation would see something strange because Microsoft supports 'thunks' for calling from emulated x64/x32 into ARM64 DLLs, and I saw evidence of that in ucrtbase.dll.

@Biswa96
Copy link
Member

Biswa96 commented Mar 3, 2022

Depending on exact CPU instructions to get a hidden structure pointer is itself a broken idea. They have to rewrite all the __pioinfo related code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants