Skip to content

[pull] master from ruby:master - #1431

Merged
pull[bot] merged 18 commits into
turkdevops:masterfrom
ruby:master
Sep 21, 2026
Merged

pull[bot] merged 18 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Sep 21, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

nobu and others added 18 commits September 20, 2026 23:05
Once all `*.rbinc` files have been generated, the command should not
be required anymore.
String#tr can crash if keys are removed from the translation hash since
we stack allocate a buffer pairs. If entries are deleted during runtime,
then we won't fill the pairs buffer which can crash because it will be
reading uninitialized values out of pairs.

The following script demonstrates the crash:

    h = {}
    obj = Object.new
    obj.define_singleton_method(:to_str) do
      h.clear
      "a"
    end
    h[obj] = "x"
    ("b".."z").each { |c| h[c] = (c.ord + 1).chr }
    puts "ab".tr!(h)
fu_copy_stream0 has had no caller since b26846bf replaced both uses with direct IO.copy_stream calls in 2008. The retained private wrapper is unreachable.

ruby/fileutils@feba38f651
…able

In user-namespace environments (e.g. ChromeOS Crostini) getgroups(2) can report supplementary groups such as the overflow GID 65534 (nobody) that a non-root process cannot actually chgrp a file to. TestFileUtils#setup built @groups straight from `[Process.gid] | Process.groups`, so the chown tests tried to chgrp to such a group and failed with EPERM instead of being skipped.

Filter @groups with a one-time capability probe down to the groups the process can actually assign, so the affected tests skip via their existing `return unless @groups[1]` guard when there is no usable second group.

ruby/fileutils@8dc0266054

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Skip the test_rm_r_no_permissions test under the root user, as deletion always succeeds.

Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>

ruby/fileutils@3c831389c5
Since `Process.uid` returns `0` always on mingw or mswin, `root_in_posix?` returns `true` too.

ruby/fileutils@d18fbf0c56
If the source string is modified when converting offset to an integer,
then there could be an out-of-bounds access because the length of the
string is captured before to_int is called. For example, the following
script triggers an ASAN error:

    s = "héllo" * 1_000_000
    obj = Object.new
    obj.define_singleton_method(:to_int) do
      s.replace("é" * 1000)
      450000
    end
    p s.byteindex("l", obj)
When the array is shrunk during rb_arithmetic_sequence_beg_len_step,
ary_subseq_len returns -1. Return an empty array instead of passing the
negative length to ary_make_partial or ary_make_partial_step.

[Bug #22325]
We need to keep track of pending pages in RubyHeapTrigger otherwise a large
allocation may cause infinite number of GCs to be ran since it will always
appear that we have enough space in the heap (and thus the heap won't grow)
but still not have enough for the allocation.

ruby/mmtk@dd8034050d
@pull pull Bot locked and limited conversation to collaborators Sep 21, 2026
@pull pull Bot added the ⤵️ pull label Sep 21, 2026
@pull
pull Bot merged commit eb08b74 into turkdevops:master Sep 21, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants