778a43dd56
It differs from the Oniguruma patch in that it dosen't use `onigenc_get_prev_char_head()`
because this function's signature has been changed by Oniguruma and the change is not ported
in Onigmo for now. This patch respects the current Onigmo implementation.
Co-Authored-By: K.Kosako <kkos@users.noreply.github.com>
Fix Visual C warnings:
```
iseq.c(3793): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
iseq.c(3794): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
```
4262123282
```
1)
File.atime returns the last access time for the named file with microseconds FAILED
Expected 0 == 123456
to be truthy but was false
D:/a/ruby/ruby/src/spec/ruby/core/file/atime_spec.rb:26:in `block (3 levels) in <top (required)>'
D:/a/ruby/ruby/src/spec/ruby/core/file/atime_spec.rb:3:in `<top (required)>'
2)
File.ctime returns the change time for the named file (the time at which directory information about the file was changed, not the file itself) with microseconds. FAILED
Expected 0 > 0
to be truthy but was false
D:/a/ruby/ruby/src/spec/ruby/core/file/ctime_spec.rb:21:in `block (3 levels) in <top (required)>'
D:/a/ruby/ruby/src/spec/ruby/core/file/ctime_spec.rb:3:in `<top (required)>'
3)
File.utime sets the access and modification time of each file FAILED
Expected 2025-05-21 10:30:54 +0000
to be within 2025-05-21 10:30:54 +0000 +/- 0.0001
D:/a/ruby/ruby/src/spec/ruby/core/file/utime_spec.rb:25:in `block (2 levels) in <top (required)>'
D:/a/ruby/ruby/src/spec/ruby/core/file/utime_spec.rb:3:in `<top (required)>'
4)
File.mtime returns the modification Time of the file with microseconds FAILED
Expected 0 == 123456
to be truthy but was false
D:/a/ruby/ruby/src/spec/ruby/core/file/mtime_spec.rb:25:in `block (3 levels) in <top (required)>'
D:/a/ruby/ruby/src/spec/ruby/core/file/mtime_spec.rb:3:in `<top (required)>'
```
It may be fixed with 7aea269b89.
But Ruby 3.2 is now security maintenance status. We can't backport it.
Push a real iseq in rb_vm_push_frame_fname()
Previously, vm_make_env_each() (used during proc
creation and for the debug inspector C API) picked up the
non-GC-allocated iseq that rb_vm_push_frame_fname() creates,
which led to a SEGV when the GC tried to mark the non GC object.
Put a real iseq imemo instead. Speed should be about the same since
the old code also did a imemo allocation and a malloc allocation.
Real iseq allows ironing out the special-casing of dummy frames in
rb_execution_context_mark() and rb_execution_context_update(). A check
is added to RubyVM::ISeq#eval, though, to stop attempts to run dummy
iseqs.
[Bug #21180]
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Fix crash in rb_gc_register_address
[Bug #19584]
Some C extensions pass a pointer to a global variable to
rb_gc_register_address. However, if a GC is triggered inside of
rb_gc_register_address, then the object could get swept since it does
not exist on the stack.
[Bug #19584] Register global variable address before assignment
[Bug #19584] Register global variables before assignment
[Bug #19584] [DOC] Tweek description of `rb_gc_register_address`