-*- coding: utf-8 -*-

commit c56cd86388092faec079981f779f140717020d58
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2024-04-23 19:20:14 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2024-04-23 19:20:14 +0900

    v3.3.1

commit dde99215f2bc60c22a00fc941ff7f714f011e920
  Author:     Isaac Peka <7493006+isaac-peka@users.noreply.github.com>
  AuthorDate: 2023-08-24 20:14:33 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2024-04-22 16:42:03 +0900

    Fix handling of reg->dmin in Regex matching

commit c38fc1bb36597264840d96d7475b9891c61c5240
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2024-04-12 14:01:47 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2024-04-22 16:29:28 +0900

    Fix Use-After-Free issue for Regexp

    Co-authored-by: Isaac Peka <7493006+isaac-peka@users.noreply.github.com>

commit 7227b859a7bf7626ee73de8130796657b7c7f3b5
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2024-04-16 11:22:22 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-04-16 11:22:22 +0900

    Merge RubyGems 3.5.9 and Bundler 2.5.9 (Fixed CI at Ruby 3.3) (#10348)

    * Merge RubyGems-3.5.6 and Bundler-2.5.6

    * Merge RubyGems-3.5.7 and Bundler-2.5.7

    * Merge RubyGems-3.5.8 and Bundler-2.5.8

    * Partly reverted about https://github.com/rubygems/rubygems/pull/7483

    * Merge RubyGems-3.5.9 and Bundler-2.5.9

commit 2f654588d9e0cefff1c23529d2f2672029e1bd21
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2024-03-25 17:09:56 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-25 17:09:56 +0900

    Backport https://github.com/ruby/ruby/pull/10347 (#10349)

    Fix incorrect warning target with Zeitwerk and support warning with Bootsnap.

commit 6d6818883b8f613fe9b6c72ac7eb9b313bba097b
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-22 10:33:40 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-22 10:33:40 +0900

    merge revision(s) b176315827d1082f43628013a7d89fda02724d33: [Backport #20324] (#10329)

    [Bug #20324] Uncomparable ranges are not overlapping

commit a24802e8fd7e05077256605885c82ffd8221bc94
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-22 09:25:36 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-22 09:25:36 +0900

    merge revision(s) c7ce2f537f96ab2cf2f5fc2982d6147866ff5340: [Backport #20304] (#10311)

    Fix memory leak in setting encodings

            There is a memory leak in Encoding.default_external= and
            Encoding.default_internal= because the duplicated name is not freed
            when overwriting.

                10.times do
                  1_000_000.times do
                    Encoding.default_internal = nil
                  end

                  puts `ps -o rss= -p #{$$}`
                end

            Before:

                 25664
                 41504
                 57360
                 73232
                 89168
                105056
                120944
                136816
                152720
                168576

            After:

                9648
                9648
                9648
                9680
                9680
                9680
                9680
                9680
                9680
                9680

commit eb7cb164cffc86b63d2e2528c73e160c33b7a2e5
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2024-03-21 16:12:38 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-21 16:12:38 +0900

    CVE-2024-27281 for Ruby 3.3 (#10316)

    Merge RDoc-6.6.3.1

commit f79b1d1ef1f7aa64d20f0eadbb3b0f8f7084deb3
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-21 14:31:36 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-21 14:31:36 +0900

    merge revision(s) e626da82eae3d437b84d4f9ead0164d436b08e1a,f3af5ae7e6c1c096bbfe46d69de825a02b1696cf: [Backport #20311] (#10312)

    Don't pin named structs defined in Ruby

            [Bug #20311]

            `rb_define_class_under` assumes it's called from C and that the
            reference might be held in a C global variable, so it adds the
            class to the VM root.

            In the case of `Struct.new('Name')` it's wasteful and make
            the struct immortal.

            Make Struct memory leak test faster

            [Bug #20311]

            It times out on some platform, so we can reduce iterations.
            On my machine it completes in 250ms and RSS grows 8X.

commit 57a0afe2090b8d05673d650b1e8bf9ae67449b1f
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-21 11:23:21 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-21 11:23:21 +0900

    merge revision(s) 081ee3d35509110f383cb7dd8d1205def0cdd1e8,1c97abaabae6844c861705fd07f532292dcffa74: [Backport #19907] (#10315)

    Add memory leak test for eval kwargs

            De-dup identical callinfo objects

            Previously every call to vm_ci_new (when the CI was not packable) would
            result in a different callinfo being returned this meant that every
            kwarg callsite had its own CI.

            When calling, different CIs result in different CCs. These CIs and CCs
            both end up persisted on the T_CLASS inside cc_tbl. So in an eval loop
            this resulted in a memory leak of both types of object. This also likely
            resulted in extra memory used, and extra time searching, in non-eval
            cases.

            For simplicity in this commit I always allocate a CI object inside
            rb_vm_ci_lookup, but ideally we would lazily allocate it only when
            needed. I hope to do that as a follow up in the future.

commit 821719a505bbc628ddd80b90ae892666006eada1
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-21 11:18:06 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-21 11:18:06 +0900

    merge revision(s) d3279a0c11ca45ca85027e7eb74dc4aac52c478b: [Backport #20327] (#10313)

    [Bug #20327] Do not count subsecond to calculate UTC offset

            Assume that there will never be any time zones with UTC offsets that
            are subseconds.  Historically, UTC offset has only been used down to
            the second.

commit a63e979853783601a60228b45741f8b3776e5507
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-21 10:45:01 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-21 10:45:01 +0900

    merge revision(s) d19d683a354530a27b4cbb049223f8dc70c75849,de1a586ecc2ee7f465f0c0a69291054136a3a819: [Backport #20250] (#10308)

    rb_obj_setup: do not copy RUBY_FL_SEEN_OBJ_ID

            [Bug #20250]

            We're seting up a new instance, so it never had an associated
            object_id.

            proc.c: get rid of `CLONESETUP`
            MIME-Version: 1.0
            Content-Type: text/plain; charset=UTF-8
            Content-Transfer-Encoding: 8bit

            [Bug #20253]

            All the way down to Ruby 1.9, `Proc`, `Method`, `UnboundMethod`
            and `Binding` always had their own specific clone and dup routine.

            This caused various discrepancies with how other objects behave
            on `dup` and `clone. [Bug #20250], [Bug #20253].

            This commit get rid of `CLONESETUP` and use the the same codepath
            as all other types, so ensure consistency.

            NB: It's still not accepting the `freeze` keyword argument on `clone`.

            Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>

commit a406c516685f1950269c4e43d13cc748f0bfbc06
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-21 10:28:51 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-21 10:28:51 +0900

    merge revision(s) ae8990aef098410ecc2b5f48fea9d7d171a3c5f6: [Backport #20183] (#10310)

    Alias init functions

            The extension library has each initialization function named "Init_" +
            basename. If multiple extensions have the same base name (such as
            cgi/escape and erb/escape), the same function will be registered for
            both names.

            To fix this conflict, rename the initialization functions under sub
            directories using using parent names, when statically linking.

commit 05787897f69087abdabee926971cdf364bd73730
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-21 09:10:44 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-21 09:10:44 +0900

    merge revision(s) 18ee7c9a108bf3424814565377c8796e5e455cf7,4a6384ed9358e8fb8464f6e37efb5477182f01db: [Backport #20246] (#10309)

    Clear all refined CCs on reopening refinement mod

            In cfd7729ce7a31c8b6ec5dd0e99c67b2932de4732 we started using inline
            caches for refinements. However, we weren't clearing inline caches when
            defined on a reopened refinement module.

            Fixes [Bug #20246]

            Fix [Bug #20246]: Don't set next_head_exact if a capture is called (#9897)

commit b2c2702f20abfd4bb5f38cad60170e2bbb3adff9
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-21 09:05:07 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-21 09:05:07 +0900

    merge revision(s) 01fd262e62076277a41af72ea13f20deb1b462a2: [Backport #20245] (#10307)

    Fix crash when checking symbol encoding

            [Bug #20245]

            We sometimes pass in a fake string to sym_check_asciionly. This can crash
            if sym_check_asciionly raises because it creates a CFP with the fake
            string as the receiver which will crash if GC tries to mark the CFP.

            For example, the following script crashes:

                GC.stress = true
                Object.const_defined?("\xC3")

commit 00cb72157a60c20a9b9d9fe81fc974ea83d672b4
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-21 02:13:59 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-21 02:13:59 +0900

    merge revision(s) 3e6e3ca2627b1aa71b17de902cc1b8188246a828: [Backport #20207] (#10299)

    Correctly handle consecutive lookarounds (#9738)

            Fix [Bug #20207]
            Fix [Bug #20212]

            Handling consecutive lookarounds in init_cache_opcodes is buggy, so it
            causes invalid memory access reported in [Bug #20207] and [Bug #20212].
            This fixes it by using recursive functions to detected lookarounds
            nesting correctly.

commit c626c201e4129bbea17583ecef73472c6f668c81
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-20 22:40:50 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-20 22:40:50 +0900

    merge revision(s) 01bfd1a2bf013a9ed92a9722ac5228187e05e6a8,1c120efe02d079b0a1dea573cf0fd7978d9cc857,31378dc0969f4466b2122d730b7298dd7004acdf: [Backport #20228] (#10301)

    Fix memory leak in OnigRegion when match raises

            [Bug #20228]

            rb_reg_onig_match can raise a Regexp::TimeoutError, which would cause
            the OnigRegion to leak.

            Fix memory leak in stk_base when Regexp timeout

            [Bug #20228]

            If rb_reg_check_timeout raises a Regexp::TimeoutError, then the stk_base
            will leak.

            Add memory leak test for Regexp timeout

            [Bug #20228]

commit ce372be903e5f3597f1dc83cb558f165850b3bee
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-20 22:40:46 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-20 22:40:46 +0900

    merge revision(s) ade56737e2273847426214035c0ff2340b43799a: [Backport #20190] (#10300)

    Fix coderange of invalid_encoding_string.<<(ord)

            Appending valid encoding character can change coderange from invalid to valid.
            Example: "\x95".force_encoding('sjis')<<0x5C will be a valid string "\x{955C}"

commit 69cee6fee50f63cd52d59325dc3780a6fc4e5ae2
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-20 20:05:31 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-20 20:05:31 +0900

    merge revision(s) 771a2f039b9a059a73e8f111d1d46590fa697f63: [Backport #20213] (#10297)

    Fix incorrect use of VM_CALL_KW_SPLAT_MUT in zsuper with keyword splat

            For zsuper calls with a keyword splat but no actual keywords, the
            keyword splat is passed directly, so it cannot be mutable, because
            if the callee accepts a keyword splat, changes to the keyword splat
            by the callee would be reflected in the caller.

            While here, simplify the logic when the method supports
            literal keywords.  I don't think it is possible for
            a method with has_kw param flags to not have keywords, so add an
            assertion for that, and set VM_CALL_KW_SPLAT_MUT in a single place.

commit 0793cbbfde261f4fc9bf7045594d62a21e391811
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-20 20:05:21 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-20 20:05:21 +0900

    merge revision(s) ef276858d9295208add48e27208c69184dc50472: [Backport #20197] (#10296)

    Trigger postponed jobs on running_ec if that is available

            Currently, any postponed job triggered from a non-ruby thread gets sent
            to the main thread, but if the main thread is sleeping it won't be
            checking ints. Instead, we should try and interrupt running_ec if that's
            possible, and only fall back to the main thread if it's not.

            [Bug #20197]
            ---
             ractor.c | 16 ++++++++++++++++
             1 file changed, 16 insertions(+)

commit 23bfe6218a690bbde5143e26bc6fb243347fb4b3
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-20 20:05:08 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-20 20:05:08 +0900

    merge revision(s) b14674b236445fb70f484603e678722760f678f4: [Backport #20194] (#10295)

    Memory leak with TracePoint on bmethod

            [Bug #20194]

            When disabling the TracePoint on bmethod, the hooks list is not freed.

            For example:

                obj = Object.new
                obj.define_singleton_method(:foo) {}
                bmethod = obj.method(:foo)
                tp = TracePoint.new(:return) {}

                10.times do
                  100_000.times do
                    tp.enable(target: bmethod) {}
                  end

                  puts `ps -o rss= -p #{$$}`
                end

            Before:

                18208
                22832
                26528
                29728
                34000
                37776
                40864
                44400
                47680
                51504

            After:

                16688
                17168
                17168
                17248
                17696
                17760
                17824
                17824
                17856
                17920
            ---
             test/ruby/test_settracefunc.rb | 13 +++++++++++++
             vm_trace.c                     |  1 +
             2 files changed, 14 insertions(+)

commit 7ae8abc23961bf4fa143a7a2cc0bc38167d468ae
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-20 20:00:47 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-20 20:00:47 +0900

    merge revision(s) bb59696614083660241ef272f222628cbfa95844: [Backport #20098] (#10298)

    Fix [Bug #20098]: set counter value for {n,m} repetition correctly (#9391)

commit bd42c1725a3bba0f97831aa3dbaa6924f506a5f3
  Author:     KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>
  AuthorDate: 2024-03-15 01:27:35 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-15 01:27:35 +0900

     Backport #20096 to Ruby 3.3 (#9471)

    Fix memory overread in registry.rb

    The terminator is not actually getting filled in; we're simply passing
    (two) bytes of empty memory as the NUL terminator. This can lead to
    garbage characters getting written to registry values.

    Fix this by explicitly putting a WCHAR_NUL character into the string to
    be sent to the registry API, like we do in the MULTI_SZ case.

    [Bug #20096]

commit 606dd03e9b0d4cf65ef56e52fab063e3ed5ef797
  Author:     KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>
  AuthorDate: 2024-03-15 01:27:05 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-15 01:27:05 +0900

    [Bug #20208] Revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls for outgoi… (#9791)

    Revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls for outgoing conns"

    This reverts commit 673ed41c81cf5a6951bcb2c3dec82d7bd6ea7440.

commit 53f0c5a4e8834f11af0f903d2c59754d9be2a7f2
  Author:     Kerem Kat <keremkat@gmail.com>
  AuthorDate: 2024-03-15 01:26:35 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-15 01:26:35 +0900

    Backport #9498 to Ruby 3.3 (#9805)

    Handle mmap failures for redblack tree cache

    The redblack tree cache is totally optional, so if we can't allocate
    room for the cache, then just pretend as if the cache is full if mmap
    fails

    Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>

commit cdcabd8a44ee2f4a2b549a3460a5c77c2dffca36
  Author:     Alan Wu <XrXr@users.noreply.github.com>
  AuthorDate: 2024-03-15 01:26:02 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-15 01:26:02 +0900

    Backport 3.3: YJIT memory leak fix with additional CI fixes (#9841)

    merge revision(s) 2cc7a56e,b0711b1,db5d9429: [Backport #20209]

            YJIT: Avoid leaks by skipping objects with a singleton class

            For receiver with a singleton class, there are multiple vectors YJIT can
            end up retaining the object. There is a path in jit_guard_known_klass()
            that bakes the receiver into the code, and the object could also be kept
            alive indirectly through a path starting at the CME object baked into
            the code.

            To avoid these leaks, avoid compiling calls on objects with a singleton
            class.

            See: https://github.com/Shopify/ruby/issues/552

            [Bug #20209]
            ---
             yjit/bindgen/src/main.rs       |  1 +
             yjit/src/codegen.rs            | 17 +++++++++++++++++
             yjit/src/cruby_bindings.inc.rs |  1 +
             yjit/src/stats.rs              |  2 ++
             4 files changed, 21 insertions(+)

            YJIT: Fix tailcall and JIT entry eating up FINISH frames (#9729)

            Suppose YJIT runs a rb_vm_opt_send_without_block()
            fallback and the control frame stack looks like:

            ```
            will_tailcall_bar [FINISH]
            caller_that_used_fallback
            ```

            will_tailcall_bar() runs in the interpreter and sets up a tailcall.
            Right before JIT_EXEC() in the `send` instruction, the stack will look like:

            ```
            bar [FINISH]
            caller_that_used_fallback
            ```

            Previously, JIT_EXEC() ran bar() in JIT code, which caused the `FINISH`
            flag to return to the interpreter instead of to the JIT code running
            caller_that_used_fallback(), causing code to run twice and probably
            crash. Recent flaky failures on CI about "each stub expects a particular
            iseq" are probably due to leaving methods twice in
            `test_optimizations.rb`.

            Only run JIT code from the interpreter if a new frame is pushed.
            ---
             test/ruby/test_optimization.rb | 11 +++++++++++
             vm_exec.h                      |  3 ++-
             2 files changed, 13 insertions(+), 1 deletion(-)

            YJIT: No need to RESTORE_REG now that we reject tailcalls

            Thanks to Kokubun for noticing.

            Follow-up: b0711b1cf152afad0a480ee2f9bedd142a0d24ac
            ---
             vm_exec.h | 1 -
             1 file changed, 1 deletion(-)

commit fafe5db7328eb3395ac4559992701b5f25ab49f4
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-14 23:18:15 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-14 23:18:15 +0900

    merge revision(s) b3d612804946e841e47d14e09b6839224a79c1a4: [Backport #20150] (#10253)

    Fix memory leak in grapheme clusters

            [Bug #20150]

            String#grapheme_cluters and String#each_grapheme_cluster leaks memory
            because if the string is not UTF-8, then the created regex will not
            be freed.

            For example:

                str = "hello world".encode(Encoding::UTF_32LE)

                10.times do
                  1_000.times do
                    str.grapheme_clusters
                  end

                  puts `ps -o rss= -p #{$$}`
                end

            Before:

                26000
                42256
                59008
                75792
                92528
                109232
                125936
                142672
                159392
                176160

            After:

                9264
                9504
                9808
                10000
                10128
                10224
                10352
                10544
                10704
                10896
            ---
             string.c                 | 98 +++++++++++++++++++++++++++++++-----------------
             test/ruby/test_string.rb | 11 ++++++
             2 files changed, 75 insertions(+), 34 deletions(-)

commit 2a84aaf4a8c8d6d6bbb09416711922532b0033fe
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-14 18:55:52 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-14 18:55:52 +0900

    Fix test session reuse but expire (#9824) (#10250)

    merge revision(s) 596db9c1f486d6609a4e97d82c8c71b54609fb6f: [Backport #20090]

            [Feature #19370] Blocks without anonymous parameters should not
             affect

            ---
             parse.y                  | 4 ++--
             test/ruby/test_syntax.rb | 7 +++++++
             2 files changed, 9 insertions(+), 2 deletions(-)

commit a889304fed63c3206f27d614ab75219271fb4ca9
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-14 18:42:28 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-14 18:42:28 +0900

    merge revision(s) 6c0e58a54e3fda604386d9c409e2a9998bbc9352: [Backport #20198] (#10252)

    Make sure the correct error is raised for EAI_SYSTEM resolver fail

            In case of EAI_SYSTEM, getaddrinfo is supposed to set more detail in
            errno; however, because we call getaddrinfo on a thread now, and errno
            is threadlocal, that information is being lost. Instead, we just raise
            whatever errno happens to be on the calling thread (which can be
            something very confusing, like `ECHILD`).

            Fix it by explicitly propagating errno back to the calling thread
            through the getaddrinfo_arg structure.

            [Bug #20198]
            ---
             ext/socket/raddrinfo.c | 25 +++++++++++++++++++------
             1 file changed, 19 insertions(+), 6 deletions(-)

commit 72d04bb073e6897fb4228d5b0b31ad02cbb91036
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2023-12-26 15:05:20 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2024-03-14 18:38:42 +0900

    Disable to run appveyor anymore

      [Feature #19982]

commit 8c4b5ac53b42b5bbbb279d17128b64ae685e7274
  Author:     Nobuyoshi Nakada <nobu@ruby-lang.org>
  AuthorDate: 2023-12-25 22:12:19 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2024-03-14 18:38:42 +0900

    Skip AppVeyor and GitHub if only other CI files are changed

commit 577f9c7a8334bb33512f01e7db95f6fb15e280b2
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-03-14 16:53:14 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-03-14 16:53:14 +0900

    Backport 37ed86fd3c798e298fad9db6e7df1f3f45e1e03b (#10248)

    merge revision(s) 37ed86fd3c798e298fad9db6e7df1f3f45e1e03b: [Backport #--ticket=20161]

            Fix memory leak in regexp grapheme clusters

            [Bug #20161]

            The cc->mbuf gets overwritten, so we need to free it to not leak memory.

            For example:

                str = "hello world".encode(Encoding::UTF_32LE)

                10.times do
                  1_000.times do
                    str.grapheme_clusters
                  end

                  puts `ps -o rss= -p #{$$}`
                end

            Before:

                15536
                15760
                15920
                16144
                16304
                16480
                16640
                16784
                17008
                17280

            After:

                15584
                15584
                15760
                15824
                15888
                15888
                15888
                15888
                16048
                16112
            ---
             regparse.c | 3 ++-
             1 file changed, 2 insertions(+), 1 deletion(-)

commit ade02f3c8909a8bf630af2c88f00b7bd7ff02682
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2024-03-04 11:57:04 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2024-03-04 11:57:04 +0900

    merge revision(s) 051a874325c177e040301878069c2b28f5d06ce6: [Backport #20096]

            Fix memory overread in registry.rb

            The terminator is not actually getting filled in; we're simply passing
            (two) bytes of empty memory as the NUL terminator. This can lead to
            garbage characters getting written to registry values.

            Fix this by explicitly putting a WCHAR_NUL character into the string to
            be sent to the registry API, like we do in the MULTI_SZ case.

            [Bug #20096]
            ---
             ext/win32/lib/win32/registry.rb | 7 ++-----
             1 file changed, 2 insertions(+), 5 deletions(-)

commit 3f0e3ede02f7d4b31c9073c9eb912f11aa4349cd
  Author:     Takashi Kokubun <takashikkbn@gmail.com>
  AuthorDate: 2024-02-05 23:51:16 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-05 23:51:16 +0900

    YJIT: Fix exits on splatkw instruction (#9715)

    [[Bug #20214]](https://bugs.ruby-lang.org/issues/20214)

commit ac526abcd6d82545b8dc3586efb55d75f45f7417
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2024-02-05 23:51:04 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-05 23:51:04 +0900

    Merge RubyGems 3.5.5 and Bundler 2.5.5 (#9676)

    * Merge RubyGems-3.5.4 and Bundler-2.5.4

    * Merge RubyGems-3.5.5 and Bundler-2.5.5

    * Make tests play with upstream Ruby tests

    CI broke in https://github.com/ruby/ruby/pull/9604 because if any Ruby
    tests run `require 'net/http'`, they will pollute the
    `$LOADED_FEATURES` for the RubyGems tests. We can fix this by renaming
    the test default gem from `net-http` to `my-http`.

    See https://github.com/rubygems/rubygems/pull/7379#issuecomment-1901241299
    for more details.

    ---------

    Co-authored-by: Stan Hu <stanhu@gmail.com>

commit 7f97e3540ce448b501bcbee15afac5f94bb22dd9
  Author:     Yuta Saito <kateinoigakukun@gmail.com>
  AuthorDate: 2024-02-05 23:50:20 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-05 23:50:20 +0900

    [Backport 3.3] [Bug #20085] Use consistent default options for `-mbranch-protection` (#9385)

    [Bug #20085] Use consistent default options for `-mbranch-protection`

    We need to use the same options for both C compiler and assembler
    when `-mbranch-protection` is guessed by configure. Otherwise,
    `coroutine/arm64/Context.{h,S}` will use incompatible PAC strategies.

commit 288d84d827da6cb8a56ed614a9839a06488986c0
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-02-05 17:41:56 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-05 17:41:56 +0900

    merge revision(s) 2554c5d3b8738a248cedb2fea96dfab9fbe19417: [Backport #20231] (#9831)

    Don't wait in `io_binwrite_string` if not necessary. (#9792)

            ---
             io.c | 8 +++-----
             1 file changed, 3 insertions(+), 5 deletions(-)

commit d7dc57a545d75c01313a9020b162ebb648a3ea18
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-02-04 22:54:36 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-04 22:54:36 +0900

    merge revision(s) c5cf4d4e129f64cb69aaf0a829aed068ef1943c4: [Backport#19542] (#9829)

    merge revision(s) c5cf4d4e129f64cb69aaf0a829aed068ef1943c4: [Backport #19542]

            Improve behavioural consistency of unallocated (zero length)
             `IO::Buffer`. (#9532)

            This makes the behaviour of IO::Buffer.new(0) and IO::Buffer.new.slice(0, 0) consistent.

            Fixes https://bugs.ruby-lang.org/issues/19542 and https://bugs.ruby-lang.org/issues/18805.
            ---
             io_buffer.c                 | 14 ++++++--------
             test/ruby/test_io_buffer.rb | 35 +++++++++++++++++++++++++++++++++++
             2 files changed, 41 insertions(+), 8 deletions(-)

commit a065b68bd8d93505304f90bbb1855c864e17ad61
  Author:     Takashi Kokubun <takashikkbn@gmail.com>
  AuthorDate: 2024-02-04 14:37:33 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-04 14:37:33 +0900

    Backport #9415 to ruby_3_3 (#9424)

    YJIT: Let RubyVM::YJIT.enable respect --yjit-stats

commit ba16b340981942eda82d6328800b8098c452c0ca
  Author:     Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
  AuthorDate: 2024-02-04 14:36:34 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-04 14:36:34 +0900

    YJIT: reduce default exec mem size to 48MiB (#9692)

    * YJIT: reduce default exec mem size to 48MiB based

    Based on user feedback from @jhawthorn and others.
    Better for small and memory-constrained deployments.

    NOTE: This commit should be included in the next Ruby 3.3.x point
    release. @xrxr should we tag someone specific?

    * YJIT: Update yjit.md about mem size (#9687)

    ---------

    Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>

commit ce6863a0cf971e0c0328e3fc85b10b6de36ecbad
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-02-04 13:13:15 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-04 13:13:15 +0900

    merge revision(s) 18573b8d054f655e3e8b24902985bf4028f88810: [Backport #20178] (#9822)

    Avoid reading unused lvars in Primitive.cexpr

            Previously on builds with optimizations disabled, this could result in
            an out of bounds read. When we had all of:
            * built with -O0
            * Leaf builtin
            * Primitive.mandatory_only
            * "no args builtin", called by vm_call_single_noarg_inline_builti
            * The stack is escaped to the heap via binding or a proc

            This is because mk_builtin_loader generated reads for all locals
            regardless of whether they were used and in the case we generated a
            mandatory_only iseq that would include more variables than were actually
            available.

            On optimized builds, the invalid accesses would be optimized away, and
            this also was often unnoticed as the invalid access would just hit
            another part of the stack unless it had been escaped to the heap.

            The fix here is imperfect, as this could have false positives, but since
            Primitive.cexpr! is only available within the cruby codebase itself
            that's probably fine as a proper fix would be much more challenging (the
            only false positives we found were in rjit.rb).

            Fixes [Bug #20178]

            Co-authored-by: Adam Hess <HParker@github.com>
            ---
             bootstraptest/test_method.rb | 9 +++++++++
             tool/mk_builtin_loader.rb    | 6 ++++++
             2 files changed, 15 insertions(+)

commit 53d4e9c4bbba077a569549a01a8263e5e8f59ee8
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-02-04 00:47:32 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-04 00:47:32 +0900

    merge revision(s) 1bd98c820da46a05328d2d53b8f748f28e7ee8f7: [Backport #20172] (#9798)

    Remove setaffinity of pthread for getaddrinfo

            It looks like `sched_getcpu(3)` returns a strange number on some
            (virtual?) environments.

            I decided to remove the setaffinity mechanism because the performance
            does not appear to degrade on a quick benchmark even if removed.

            [Bug #20172]
            ---
             ext/socket/extconf.rb  |  2 --
             ext/socket/raddrinfo.c | 48 ++++--------------------------------------------
             2 files changed, 4 insertions(+), 46 deletions(-)

commit 45064610725ddd81a5ea3775da35aa46985bc789
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-02-03 22:35:44 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-03 22:35:44 +0900

    Fix test session reuse but expire (#9824)

    * Show OpenSSL version in the error message of assert_equal

    * OpenSSL 3.2.1 30 Jan 2024 is also broken

commit 3fb51b93d25b0566b71249b1c7ccddf0dab91429
  Author:     NARUSE, Yui <nurse@users.noreply.github.com>
  AuthorDate: 2024-02-01 16:19:48 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2024-02-01 16:19:48 +0900

    merge revision(s) 82b57d7bfeefd717c10f7a5a3484aca6b3e708a3: [Backport… (#9795)

    merge revision(s) 82b57d7bfeefd717c10f7a5a3484aca6b3e708a3: [Backport #20162]

            Fix memory leak when duplicating too complex object

            [Bug #20162]

            Creating a ST table then calling st_replace leaks memory because the
            st_replace overwrites the ST table without freeing any of the existing
            memory. This commit changes it to use st_copy instead.

            For example:

                RubyVM::Shape.exhaust_shapes

                o = Object.new
                o.instance_variable_set(:@a, 0)

                10.times do
                  100_000.times { o.dup }

                  puts `ps -o rss= -p #{$$}`
                end

            Before:

                23264
                33600
                42672
                52160
                61600
                71728
                81056
                90528
                100560
                109840

            After:

