summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-08-02Correct castings to use OnigDistanceTSUYUSATO Kitsune
2025-08-02Add castings to prevent warningsTSUYUSATO Kitsune
2025-08-02Port a Oniguruma patch: Integer overflow in onig_search_gpos()TSUYUSATO Kitsune
https://github.com/kkos/oniguruma/commit/778a43dd56925ed58bbe26e3a7bb8202d72c3f3f 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>
2025-08-02Port a Oniguruma patch: Integer overflow in backward_search_range() and ↵TSUYUSATO Kitsune
onig_search_gpos() https://github.com/kkos/oniguruma/commit/bfc36d3d8139b8be4d3df630d625c58687b0c7d4 Co-Authored-By: K.Kosako <kkos@users.noreply.github.com>
2025-08-02Port a Oniguruma patch: Integer overflow in forward_search_range()TSUYUSATO Kitsune
https://github.com/kkos/oniguruma/commit/db64ef3189f54917a5008a02bdb000adc514a90a Co-Authored-By: K.Kosako <kkos@users.noreply.github.com>
2025-07-24bump teenyv3_3_9nagachika
2025-07-24merge revision(s) 5e5cec1b86837653b2106af377561045f4bbecef:nagachika
Fix bigand_int edgecase returning false (#13987)
2025-07-24Revert bump versions of default gems for extconf.rb changes.nagachika
This reverts commit 91263c7e523dd0345c35ac4b616676132aad09d1.
2025-07-20[ruby/json] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/json/commit/95fb084027
2025-07-20[ruby/strscan] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/strscan/commit/18c0a59b65
2025-07-20[ruby/strscan] Update extconf.rbNobuyoshi Nakada
(https://github.com/ruby/strscan/pull/158) - `have_func` includes "ruby.h" by default. - include "ruby/re.h" where `rb_reg_onig_match` is declared. https://github.com/ruby/strscan/commit/1ac96f47e9
2025-07-20[ruby/openssl] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/openssl/commit/b6f56c4540
2025-07-20Bump io-nonblock to 0.3.0.1nagachika
2025-07-20[ruby/io-nonblock] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/io-nonblock/commit/70909f5362
2025-07-20Bump io-wait to 0.3.1.1nagachika
2025-07-20[ruby/io-wait] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/io-wait/commit/48309d7877
2025-07-20Bump io-console to 0.7.1.1nagachika
2025-07-20[ruby/io-console] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/io-console/commit/dd013030dd
2025-07-20bump etc-1.4.3.1nagachika
2025-07-20[ruby/etc] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/etc/commit/6668bfd42a
2025-07-20Update dependency for gorubynagachika
2025-07-20Add compilation with GCC 14,15 on GitHub workflownagachika
2025-07-20merge revision(s) b42afa1dbcbb91e89852b3b3bc72484d7f0a5528, ↵nagachika
67b91e780798b80038dbfb39a06831918a75259f, f1f0cc14cc7d3f9be35b203e5583f9224b1e2387, 543e3a1896ae2fe3b5b954f6497d261ab5663a15, ed2806117a0b76e4439ce1a061fae21d9e116d69, 46e4c8673747de96838d2c5dec37446d23d99d88: [Backport #21497] Suppress gcc 15 unterminated-string-initialization warnings Drop an ignored attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 13.3.0 (Ubuntu 24.04) emits the following warning: ../symbol.c: In function ‘rb_id_attrset’: ../symbol.c:175:9: warning: ‘nonstring’ attribute ignored on objects of type ‘const char[][8]’ [-Wattributes] 175 | RBIMPL_ATTR_NONSTRING() static const char id_types[][8] = { | ^~~~~~~~~~~~~~~~~~~~~ Separate `__has_attribute` from `defined(__has_attribute)` Fix Visual C warnings: ``` regenc.h(121): warning C4067: unexpected tokens following preprocessor directive - expected a newline ``` Cast up `int` instruction code to `VALUE` 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 ``` Do not let files depend on a phony target Detect `clock_gettime` and `clock_getres` for winpthreads
2025-07-20merge revision(s) d77e02bd85ab7f841df8d473bac214b9a92a3506: [Backport #21497]nagachika
[Bug #21497] [ruby/socket]: add full prototype MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit otherwise, gcc 15 will complain: > init.c:573:19: error: too many arguments to function ‘Rconnect’; expected 0, have 3 > 573 | return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len); > | ^~~~~~~~ ~~~~~~~ > In file included from init.c:11: > rubysocket.h:294:5: note: declared here > 294 | int Rconnect(); > | ^~~~~~~~ > sockssocket.c:33:9: error: too many arguments to function ‘SOCKSinit’; expected 0, have 1 > 33 | SOCKSinit("ruby"); > | ^~~~~~~~~ ~~~~~~ > In file included from sockssocket.c:11: > rubysocket.h:293:6: note: declared here > 293 | void SOCKSinit(); > | ^~~~~~~~~ Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
2025-07-20merge revision(s) 1181a682a6c314c92686e3701defa1eb44068c4e, ↵nagachika
0cec4a14fb832aed4b498a21ec0c19765642d408, d84a811f31a65821642b165d712f380c0cc060e0: [Backport #21448] [Bug #21448] Use `getentropy(2)` only on macOS If this is not a system call, then it is using getrandom (which would have been tried already), and cannot be used as a replacement for the random devices. Restore getrandom(2) path for Linux with glibc 2.36 or later This is a follow-up to commit b120f5e38d9c (avoid fork-unsafe arc4random implementations, 2018-09-04). Avoid defining a no-op fill_random_bytes_syscall() if arc4random_buf(3) exists, but we are unsure if it is fork-safe. Check for other options instead. IOW, see if getrandom(2) is available. glibc 2.36, released in 2022, started to provide arc4random_buf(3) on Linux. This causes fill_random_bytes_syscall() to use neither of them and makes Random.urandom solely rely on getentropy(3) via fill_random_bytes_urandom(). While the glibc implementation is safe, I did not add it to the list because using getrandom(2) directly is preferable on Linux. [Bug #21448] Reorder trials in `fill_random_bytes` First try dedicated system calls, such as `getrandom` or `getentropy`, next possible libraries, then fallback to `/dev/urandom`.
2025-07-20merge a revision partially 097d742a1ed53afb91e83aef01365d68b763357b: ↵nagachika
[Backport #20009]
2025-07-19merge revision(s) 097d742a1ed53afb91e83aef01365d68b763357b: [Backport #20009]nagachika
[Bug #20009] Support marshaling non-ASCII name class/module
2025-07-19Fix generic_ivar_set_shape_ivptr for table rebuildJohn Hawthorn
[Bug #21438] Previously GC could trigger a table rebuild of the generic ivar st_table in the middle of calling the st_update callback. This could cause entries to be reallocated or rearranged and the update to be for the wrong entry. This commit adds an assertion to make that case easier to detect, and replaces the st_update with a separate st_lookup and st_insert. Also free after insert in generic_ivar_set_shape_ivptr Previously we were performing a realloc and then inserting the new value into the table. If the table was flagged as requiring a rebuild, this could trigger GC work and marking within that GC could access the ivptr freed by realloc. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2025-07-19Bump up resolv-0.3.1 for Ruby 3.3Hiroshi SHIBATA
2025-07-02Partly picked from https://github.com/ruby/ruby/pull/10073Hiroshi SHIBATA
2025-06-29thread_cleanup: set CFP to NULL before clearing ec's stackLuke Gruber
We clear the CFP first so that if a sampling profiler interrupts the current thread during `rb_ec_set_vm_stack`, `thread_profile_frames` returns early instead of trying to walk the stack that's no longer set on the ec. The early return in `thread_profile_frames` was introduced at eab7f4623fb. Fixes [Bug #21441]
2025-06-29merge revision(s) c1877d431e76f4a782d51602fa8487e98d302956: [Backport #21437]nagachika
[ruby/date] [Bug #21437] Date#hash for large years Addresses https://bugs.ruby-lang.org/issues/21437 Signed-off-by: Dmitry Dygalo <dmitry.dygalo@workato.com> https://github.com/ruby/date/commit/31f07bc576
2025-06-29merge revision(s) 2e7e78cd590d20aa9d41422e96302f3edd73f623: [Backport #21440]nagachika
[Bug #21440] Stop caching member list in frozen Data/Struct class
2025-06-25We don't need to specify winsdk versionHiroshi SHIBATA
a205407e165e4570b8b6d6e4b7a019b51962ecba fixed that workaround
2025-06-15merge revision(s) fa85d23ff4a02985ebfe0716b0ff768f5b4fe13d: [Backport #21380]nagachika
[Bug #21380] Prohibit modification in String#split block Reported at https://hackerone.com/reports/3163876
2025-06-14merge revision(s) 72bda0f981c7136f50254c433bbfb97a953f634b: [Backport #21255]nagachika
[Bug #21255] Win32: Do not export `__declspec(selectany)` symbols ``` x64-vcruntime140-ruby350.def : error LNK2001: unresolved external symbol Avx2WmemEnabledWeakValue ```
2025-06-14merge revision(s) e1adb6cb15129a54df0c55a337e98b92b2a55e3f: [Backport #21283]nagachika
Win: Suppress false warnings from Visual C 17.14.1 https://developercommunity.visualstudio.com/t/warning-C5287:-operands-are-different-e/10877942? It is not able to silence "operands are different enum types" warnings, even using an explicit cast, as the message says.
2025-06-14merge revision(s) 2297afda7ff3926c51fea700dfbf0f0eb4fea1e5: [Backport #21340]nagachika
Include stdbool.h without checking with autoconf As reported in <https://bugs.ruby-lang.org/issues/21340>, older autoconf have an AC_HEADER_STDBOOL that's incompatible with C23. Autoconf 2.72 fixed the macro, but also mentions that it's obsolescent since all current compilers have this header. Since we require C99 [1] and VS 2015 [2], we might actually be able take that suggestion and include stdbool.h without a check. I want to try this on rubyci.org and will revert if this cause any issues. Not touching AC_HEADER_STDBOOL in configure.ac for now. [1]: https://bugs.ruby-lang.org/issues/15347 [2]: https://bugs.ruby-lang.org/issues/19982
2025-06-14merge revision(s) f6cbf499bc98b851034fffb49fcbb59d495f6f7b: [Backport #21354]nagachika
Fix Symbol#to_proc (rb_sym_to_proc) to be ractor safe In non-main ractors, don't use `sym_proc_cache`. It is not thread-safe to add to this array without a lock and also it leaks procs from one ractor to another. Instead, we create a new proc each time. If this results in poor performance we can come up with a solution later. Fixes [Bug #21354]
2025-06-10Disabled TRAP cache of CodeQLHiroshi SHIBATA
2025-06-03Remove hardcoded version of rake from Bundler testsHiroshi SHIBATA
The original commit is https://github.com/rubygems/rubygems/commit/85f73e42a563ac6848ba22aeae344a5bdc5a9ed7
2025-05-24Follow up for 380938998415c22ba3ca9bc01f4035d5a73f274d. The type of ↵nagachika
jump_to_next_insn() is Option<()> on ruby_3_3.
2025-05-24Follow up for 380938998415c22ba3ca9bc01f4035d5a73f274d. jump_to_next_insn() ↵nagachika
require 3rd argument on ruby_3_3.
2025-05-24merge revision(s) cbf9c088f8005a49b6aa3f475c70041357774c61: [Backport #21310]nagachika
YJIT: End the block after OPTIMIZE_METHOD_TYPE_CALL (#13245)
2025-05-24merge revision(s) 056497319658cbefe22351c6ec5c9fa6e4df72bd: [Backport #21357]nagachika
[Bug #21357] Fix crash in Hash#merge with block Prior to https://github.com/ruby/ruby/commit/49b306ecb9e2e9e06e0b1590bacc5f4b38169c3c the `optional_arg` passed from `rb_hash_update_block_i` to `tbl_update` was a hash value (i.e. a VALUE). After that commit it changed to an `update_call_args`. If the block sets or changes the value, `tbl_update_modify` will set the `arg.value` back to an actual value and we won't crash. But in the case where the block returns the original value we end up calling `RB_OBJ_WRITTEN` with the `update_call_args` which is not expected and may crash. `arg.value` appears to only be used to pass to `RB_OBJ_WRITTEN` (others who need the `update_call_args` get it from `arg.arg`), so I don't think it needs to be set to anything upfront. And `tbl_update_modify` will set the `arg.value` in the cases we need the write barrier.
2025-05-24merge revision(s) 49b306ecb9e2e9e06e0b1590bacc5f4b38169c3c: [Backport #21333]nagachika
[Bug #21333] Prohibit hash modification inside Hash#update block
2025-05-22Win32: Initialize the systemtime function before converting FILETIMENobuyoshi Nakada
2025-05-22Don't need to store download cache of vcpkgHiroshi SHIBATA
vcpkg can detect their cache from `vcpkg/installed`.
2025-05-18merge revision(s) 80a1a1bb8ae8435b916ae4f66a483e91ad31356a: [Backport #21257]nagachika
YJIT: Fix potential infinite loop when OOM (GH-13186) Avoid generating an infinite loop in the case where: 1. Block `first` is adjacent to block `second`, and the branch from `first` to `second` is a fallthrough, and 2. Block `second` immediately exits to the interpreter, and 3. Block `second` is invalidated and YJIT is OOM While pondering how to fix this, I think I've stumbled on another related edge case: 1. Block `incoming_one` and `incoming_two` both branch to block `second`. Block `incoming_one` has a fallthrough 2. Block `second` immediately exits to the interpreter (so it starts with its exit) 3. When Block `second` is invalidated, the incoming fallthrough branch from `incoming_one` might be rewritten first, which overwrites the start of block `second` with a jump to a new branch stub. 4. YJIT runs of out memory 5. The incoming branch from `incoming_two` is then rewritten, but because we're OOM we can't generate a new stub, so we use `second`'s exit as the branch target. However `second`'s exit was already overwritten with a jump to the branch stub for `incoming_one`, so `incoming_two` will end up jumping to `incoming_one`'s branch stub. Fixes [Bug #21257]
2025-05-18merge revision(s) b959263b58e26ef630c085f9f7ddc04373a998c7: [Backport #21344]nagachika
Fix Exception#detailed_message for GC compaction Before this commit, the test fails with RGENGC_CHECK_MODE enabled: TestException#test_detailed_message_under_gc_compact_stress [test/ruby/test_exception.rb:1466]: <"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" + "\e[1mbar\e[m\n" + "\e[1mbaz\e[m"> expected but was <"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" + "\e[1m\x00\x00\x00\x00\x00\x00\x00\e[m">.