> However, to focus on the original issue, I think it would be good to clarify whether the removal of the override targets a single C runtime environment. The removal of the overrides would target each Ruby extension that is written in ...cfis (Charlie Savage)
Hi YO4 - thank you for your last comment - I appreciate it. I too need to strive for better communication, because clearly I am not communicating very well. I hope we can all assume the best intentions in others, and realize communicatio...cfis (Charlie Savage)
Hi @YO4 - thank you for your reply. I absolutely agree a cooperative approach is best. I am saddened / quite surprised to hear that you think I have criticized someone. I certainly had no intention to do that. If I did then I apologize. ...cfis (Charlie Savage)
Hi @mame - Thank you for your response and I am sorry that you feel that way, that was not my intention. I very much appreciate your help and our discussion. Maybe we can try again? I see the problem is that Ruby exports overridden C ru...cfis (Charlie Savage)
I agree having one UCRT is best. But the very first sentence in the paragraph I linked to says: > Every executable image (EXE or DLL) can have its own statically linked CRT, or can dynamically link to a CRT. The version of the CRT stati...cfis (Charlie Savage)
@nobu - When developing an extension it can be very helpful to use a debug build. A runtime check would prohibit that, unless you also make a debug version of ruby. But that seems like a lot of unnecessary overhead. In addition, it wo...cfis (Charlie Savage)
Ah yes, you are correct @YO4. I used MSVC 2026 to build both Ruby and the extension (a dll). By default Ruby builds with /Md. This is the generated `Makefile.sub` in the win32 directory: ``` !if !defined(RUNTIMEFLAG) RUNTIMEFLAG = -M...cfis (Charlie Savage)
Thank you @mame an @nobu for looking into this. @mame I don't know why the override doesn't work. The calling C++ code is from `Microsoft Visual Studio\18\Insiders\VC\Tools\MSVC\14.50.35717\include\__msvc_filebuf.hpp`: ``` cpp _EXPO...cfis (Charlie Savage)
I gave a try to @nobu's code above (https://bugs.ruby-lang.org/issues/21498#note-9). That results in a linker error: ``` bash linking shared-object -test-/gvl/call_without_gvl.so Creating library call_without_gvl-x64-mswin64_140.l...cfis (Charlie Savage)
I have attached the "good" file and the "bad" file. The good file is generated by rewriting the extension to not use fclose, and thus not have the call go through `rb_w32_fclose`. The bad file is generated by using flcose which does end ...cfis (Charlie Savage)