summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-07-14merge revision(s) ff222ac27afe712ef6ec2bb74c81cdde1a1fa176: [Backport #21370]Takashi Kokubun
compile.c: Handle anonymous variables in `outer_variable_cmp` [Bug #21370]
2025-07-14merge revision(s) 9f91f3617bab2ee220d298ddb874ef73b10dac23: [Backport #21383]Takashi Kokubun
Fix memory leak with invalid yield in prism [Bug #21383] The following script leaks memory: 10.times do 20_000.times do eval("class C; yield; end") rescue SyntaxError end puts `ps -o rss= -p #{$$}` end Before: 16464 25536 29424 35904 39552 44576 46736 51600 56096 59824 After: 13488 16160 18240 20528 19760 21808 21680 22272 22064 22336
2025-07-14merge revision(s) 056497319658cbefe22351c6ec5c9fa6e4df72bd: [Backport #21357]Takashi Kokubun
[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-07-14merge revision(s) 49b306ecb9e2e9e06e0b1590bacc5f4b38169c3c: [Backport #21333]Takashi Kokubun
[Bug #21333] Prohibit hash modification inside Hash#update block
2025-07-09[ruby/prism] Accept a newline after the defined? keyword [Backport #21197] ↵Takashi Kokubun
(#13327) * [ruby/prism] Accept a newline after the defined? keyword [Bug #21197] https://github.com/ruby/prism/commit/22be955ce9 * Fix a compilation error Co-authored-by: Stan Lo <stan001212@gmail.com> --------- Co-authored-by: Kevin Newton <kddnewton@gmail.com> Co-authored-by: Stan Lo <stan001212@gmail.com>
2025-07-09Re-ordered vcpkg related steps. It may be affected with VsDevCmd.batHiroshi SHIBATA
2025-07-09Use the latest version of Visual Studio with windows-2022 runner imageHiroshi SHIBATA
2025-07-08Bump up resolv-0.6.2 for Ruby 3.4 (#13818)Hiroshi SHIBATA
2025-07-01Backport GH-13617 for s390x (#13757)Hiroshi SHIBATA
2025-06-25Specified --vcpkg-root with scoop directoryHiroshi SHIBATA
2025-06-25Replaced built-in binary cache of vcpkg to actions/cacheHiroshi SHIBATA
``` %VCPKG_BINARY_SOURCES%: warning: The 'x-gha' binary caching backend has been removed. Consider using a NuGet-based binary caching provider instead, see extended documentation at https://learn.microsoft.com/vcpkg/users/binarycaching?WT.mc_id=vcpkg_inproduct_cli. on expression: clear;x-gha,readwrite ```
2025-06-25Added rake test to allow failuresHiroshi SHIBATA
2025-06-25Win: Suppress false warnings from Visual C 17.14.1Nobuyoshi Nakada
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-24Try to use windows-2025 runner for test-bundled-gemsHiroshi SHIBATA
2025-06-24Try to use the latest version of winsdk in windows-2025 runnerHiroshi SHIBATA
2025-06-24[Bug #21255] Win32: Do not export `__declspec(selectany)` symbolsNobuyoshi Nakada
``` x64-vcruntime140-ruby350.def : error LNK2001: unresolved external symbol Avx2WmemEnabledWeakValue ```
2025-06-24Try to use the latest version of Visual Studio in windows-2025 runner.Hiroshi SHIBATA
2025-06-20thread_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-18Fix `heap-use-after-free` in `free_fast_fallback_getaddrinfo_entry` (#13231)Misaki Shioi
This change addresses the following ASAN error: ``` ==36597==ERROR: AddressSanitizer: heap-use-after-free on address 0x512000396ba8 at pc 0x7fcad5cbad9f bp 0x7fff19739af0 sp 0x7fff19739ae8 WRITE of size 8 at 0x512000396ba8 thread T0 [643/756] 36600=optparse/test_summary #0 0x7fcad5cbad9e in free_fast_fallback_getaddrinfo_entry /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/raddrinfo.c:3046:22 #1 0x7fcad5c9fb48 in fast_fallback_inetsock_cleanup /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/ipsocket.c:1179:17 #2 0x7fcadf3b611a in rb_ensure /home/runner/work/ruby-dev-builder/ruby-dev-builder/eval.c:1081:5 #3 0x7fcad5c9b44b in rsock_init_inetsock /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/ipsocket.c:1289:20 #4 0x7fcad5ca22b8 in tcp_init /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/tcpsocket.c:76:12 #5 0x7fcadf83ba70 in vm_call0_cfunc_with_frame /home/runner/work/ruby-dev-builder/ruby-dev-builder/./vm_eval.c:164:15 ... ``` A `struct fast_fallback_getaddrinfo_shared` is shared between the main thread and two child threads. This struct contains an array of `fast_fallback_getaddrinfo_entry`. `fast_fallback_getaddrinfo_entry` and `fast_fallback_getaddrinfo_shared` were freed separately, and if `fast_fallback_getaddrinfo_shared` was freed first and then an attempt was made to free a `fast_fallback_getaddrinfo_entry`, a `heap-use-after-free` could occur. This change avoids that possibility by separating the deallocation of the addrinfo memory held by `fast_fallback_getaddrinfo_entry` from the access and lifecycle of the `fast_fallback_getaddrinfo_entry` itself.
2025-06-18Ensure that memory is not freed before calling ↵Misaki Shioi
`free_fast_fallback_getaddrinfo_*` (#12661) Ensure that `getaddrinfo_entry` and `getaddrinfo_shared` exist before free them in the main thread.
2025-06-18Fix use-after-free when resizing exivars (#13637)Jean Boussier
Fix generic_ivar_set_shape_ivptr for table rebuild [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: John Hawthorn <john@hawthorn.email> Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2025-05-30Sync lockfile from rubygems/rubygems (#13472)David Rodríguez
* Sync lockfile from rubygems/rubygems * Restore lockfile for test-bundler In the past, bundler updated platform without normalized variable like arm64-darwin-23. We ignored that update. But the current bundler uses arm64-darwin for that. --------- Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2025-05-28Remove unnecessary `GEM_PATH` modificationDavid Rodríguez
2025-05-28Sync Bundler and adapt to new spec setupDavid Rodríguez
2025-05-28Revert "Revert ↵David Rodríguez
https://github.com/rubygems/rubygems/commit/d74fa0fdda481043112f9de179be572b74a711ed" This reverts commit 7dcfdf1d7d1b1d13ab9bdc6f2b4bb89c78629332.
2025-05-28Initialize `gems` tmp when initializing bundled_gems_spec suiteDavid Rodríguez
That way it works even if no Bundler specs have run before.
2025-05-23Skip failing example on Ubuntu runner of ruby/rubyHiroshi SHIBATA
https://github.com/ruby/ruby/actions/runs/14585602800/job/40910453142
2025-05-23Skip RBS tests for RDocPluginParserTest caused by interface change of RDoc ↵Hiroshi SHIBATA
6.14.0 https://github.com/ruby/ruby/actions/runs/15199473008/job/42750815986?pr=13421 ``` Error: ArgumentError: wrong number of arguments (given 0, expected 1) /Users/runner/work/ruby/ruby/src/lib/rdoc/store.rb:123:in 'initialize' /Users/runner/work/ruby/ruby/src/gems/src/rbs/test/rbs/rdoc/rbs_parser_test.rb:8:in 'Class#new' /Users/runner/work/ruby/ruby/src/gems/src/rbs/test/rbs/rdoc/rbs_parser_test.rb:8:in 'RDocPluginParserTest#parser' /Users/runner/work/ruby/ruby/src/gems/src/rbs/test/rbs/rdoc/rbs_parser_test.rb:147:in 'RDocPluginParserTest#test_instance_method_comment_and_tokens' ```
2025-05-23test/lib/helper.rb is only for ruby/rdoc repoHiroshi SHIBATA
2025-05-23Revert ↵Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/d74fa0fdda481043112f9de179be572b74a711ed
2025-05-22Apply new RDoc config optionsStan Lo
2025-05-22Sync RDoc 6.14.0Stan Lo
2025-05-22Include stdbool.h without checking with autoconfAlan Wu
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], should be able take that suggestion and include stdbool.h without a check. This worked fine on rubyci.org. [Backport #21340] [1]: https://bugs.ruby-lang.org/issues/15347 [2]: https://bugs.ruby-lang.org/issues/19982
2025-05-22Merge RubyGems-3.6.9 and Bundler-2.6.9Hiroshi SHIBATA
2025-05-22Merge RubyGems-3.6.8 and Bundler-2.6.8Hiroshi SHIBATA
2025-05-22windows-2025 runner removed D drive from their environmentHiroshi SHIBATA
2025-05-22Disabled TRAP cache of CodeQLHiroshi SHIBATA
2025-05-13v3.4.4v3_4_4Takashi Kokubun
2025-05-13YJIT: Split the block on optimized getlocal/setlocal (#13331)Takashi Kokubun
2025-05-13[Bug #21331] Prohibit hash modification during stlike loopNobuyoshi Nakada
2025-05-13Remove unused retval assignmentsNobuyoshi Nakada
2025-05-13Revert "[Bug #21331] Prohibit modification during stlike loop"Nobuyoshi Nakada
This reverts commit bb180b87b43c45e17ff49735a26d7a188d5c8396, which caused "malloc during GC" error on wasm.
2025-05-13merge revision(s) 3e47e7a499acd256be549935fcb559d3c82e556c, ↵Takashi Kokubun
b48b841378f80e16378ceb83f3b78e52df9ae023, 2fe8b9cd3d308d754f3d33a948dfb1dd782a10dc: [Backport #21327] Fix redefinition of `clock_gettime` and `clock_getres` winpthreads-git 12.0.0.r720 provides `clock_gettime` and `clock_getres` as inline functions. digest.so needs ruby/digest.h which is installed by build-ext Copy to path with the base name
2025-05-13merge revision(s) bb180b87b43c45e17ff49735a26d7a188d5c8396: [Backport #21331]Takashi Kokubun
[Bug #21331] Prohibit modification during stlike loop
2025-05-07Fix C23 (GCC 15) WIN32 compatibility for rb_define_* functionsAlan Wu
Backport [Bug #21286]
2025-05-06Skip an unstable Ractor testTakashi Kokubun
2025-05-06YJIT: End the block after OPTIMIZE_METHOD_TYPE_CALLTakashi Kokubun
2025-05-02[Backport 3.4] Fix C level backtraces for USE_ELFDaniel Colson
[Backport #21289]
2025-05-01[rubygems/rubygems] Fixed rubocop issue: Layout/SpaceInsideBlockBracesHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/77a52b011a
2025-05-01Run the proper version of `rake`Nobuyoshi Nakada