General

Profile

cfis (Charlie Savage)

  • Login: cfis
  • Registered on: 07/23/2008
  • Last sign in: 11/26/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 2 69 71

Activity

11/24/2025

10:16 PM Ruby Bug #21498: Windows - Ruby Overrides C Library APIs thus breaking them
> 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)

11/19/2025

05:31 PM Ruby Bug #21498: Windows - Ruby Overrides C Library APIs thus breaking them
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)

11/18/2025

05:51 AM Ruby Bug #21498: Windows - Ruby Overrides C Library APIs thus breaking them
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)

11/17/2025

10:52 PM Ruby Bug #21498: Windows - Ruby Overrides C Library APIs thus breaking them
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)
07:14 AM Ruby Bug #21498: Windows - Ruby Overrides C Library APIs thus breaking them
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)
04:37 AM Ruby Bug #21498: Windows - Ruby Overrides C Library APIs thus breaking them
@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)
02:19 AM Ruby Bug #21498: Windows - Ruby Overrides C Library APIs thus breaking them
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)

11/15/2025

09:24 PM Ruby Bug #21498: Windows - Ruby Overrides C Library APIs thus breaking them
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)
05:58 AM Ruby Bug #21498: Windows - Ruby Overrides C Library APIs thus breaking them
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)
05:21 AM Ruby Bug #21498: Windows - Ruby Overrides C Library APIs thus breaking them
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)

Also available in: Atom