Skip to content

[pull] master from ruby:master#1124

Merged
pull[bot] merged 15 commits into
turkdevops:masterfrom
ruby:master
Jun 17, 2026
Merged

[pull] master from ruby:master#1124
pull[bot] merged 15 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Jun 17, 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 : )

olleolleolle and others added 15 commits June 17, 2026 06:55
The method used explicit `super(*args, **kw)`, which made the test an
exact duplicate of test_explicit_super_kwsplat and never exercised the
zsuper code path its name implies. Use bare `super` so it actually tests
implicit super.
#16919 changed malloc counters to be
reset in `gc_sweep_finish`. However, this introduced two problems:

1. If a GC is triggered due to the `malloc_limit` being hit, then it would
   run a GC with lazy sweeping, during lazy sweeping Ruby code could call
   `xmalloc`, which would immediately finish sweeping by calling `gc_rest`
   because the `malloc_increase` is not reset.
2. When `gc_rest` is called, it immediately completes sweeping. However,
   all of the counters for the freed memory is lost because `malloc_increase`
   is reset at the end. Previously, lazy sweeping would be interleaved
   with Ruby code execution, meaning `xfree` was interleaved with `xmalloc`,
   allowing for more memory to be allocated before `malloc_increase` hits
   `malloc_limit`.

The issue can be reproduced by this script:

   live = []
   500.times do
   live << Array.new(200) { String.new(capacity: 64 * 1024) }
   end
   puts GC.stat

Before:

   {count: 235, ..., minor_gc_count: 196, major_gc_count: 39}

After:

   {count: 196, ..., minor_gc_count: 153, major_gc_count: 43}
Use `RUBY_REFERENCES` instead of `RUBY_REFERENCES_START` /
`RUBY_REFERENCES_END` which are not described here.
Offsets are not serialized but the locations require them to work correctly.

ruby/prism@aa27d61d65
Ripper documentation is broken (only shows methods defined in ruby), these are public API.

ruby/prism@e5b926feb6
@pull pull Bot locked and limited conversation to collaborators Jun 17, 2026
@pull pull Bot added the ⤵️ pull label Jun 17, 2026
@pull pull Bot merged commit b646a28 into turkdevops:master Jun 17, 2026
1 of 4 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.

5 participants