<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/bootstraptest, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>YJIT: Bail out if proc would be stored above stack top</title>
<updated>2026-03-04T06:45:16+00:00</updated>
<author>
<name>Randy Stauner</name>
<email>randy@r4s6.net</email>
</author>
<published>2025-12-19T18:19:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0cba8cf414dfd8ab30edc3081645405c165a81d5'/>
<id>0cba8cf414dfd8ab30edc3081645405c165a81d5</id>
<content type='text'>
Fixes [Bug #21266].

Backport of 9168cad4d63a5d281d443bde4edea6be213b0b25 to 3.3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #21266].

Backport of 9168cad4d63a5d281d443bde4edea6be213b0b25 to 3.3
</pre>
</div>
</content>
</entry>
<entry>
<title>[3.3] Fix deadlock on th-&gt;interrupt_lock after fork</title>
<updated>2026-02-05T06:48:56+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2026-02-04T12:12:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=91f0a5a11006d7d6ba72c4d9128ae909c3adaaf8'/>
<id>91f0a5a11006d7d6ba72c4d9128ae909c3adaaf8</id>
<content type='text'>
[Bug #21860]

If a thread was holding this lock before fork, it will not exist in the
child process. We should re-initialize these locks as we do with the VM
locks when forking.

Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
Co-authored-by: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21860]

If a thread was holding this lock before fork, it will not exist in the
child process. We should re-initialize these locks as we do with the VM
locks when forking.

Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
Co-authored-by: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) f6cbf499bc98b851034fffb49fcbb59d495f6f7b: [Backport #21354]</title>
<updated>2025-06-14T02:39:08+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-06-14T02:39:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d5c8fd2043f4425c3fe2a87558dfbd80ebff9911'/>
<id>d5c8fd2043f4425c3fe2a87558dfbd80ebff9911</id>
<content type='text'>
	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]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	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]
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 80a1a1bb8ae8435b916ae4f66a483e91ad31356a: [Backport #21257]</title>
<updated>2025-05-18T07:25:01+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-05-18T07:25:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f57dd4470b9ba1e2e0007e814f94e8bb4fd2ab6f'/>
<id>f57dd4470b9ba1e2e0007e814f94e8bb4fd2ab6f</id>
<content type='text'>
	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]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	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]
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip an unstable test due to a Ractor assertion</title>
<updated>2025-01-15T05:25:34+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-01-15T05:25:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b6affbca88f5e0a70bda784d5195be5f0408b5ba'/>
<id>b6affbca88f5e0a70bda784d5195be5f0408b5ba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Filter &amp; calls from specialized C method codegen</title>
<updated>2025-01-15T05:16:37+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-01-15T05:16:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e9f479d8712f7ecd3802d4438cd44161088d9713'/>
<id>e9f479d8712f7ecd3802d4438cd44161088d9713</id>
<content type='text'>
Evident with the crash reported in [Bug #20997], the C replacement
codegen functions aren't authored to handle block arguments (nor
should they because the extra code from the complexity defeats
optimization). Filter sites with VM_CALL_ARGS_BLOCKARG.

Co-Authored-By: Alan Wu &lt;alanwu@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Evident with the crash reported in [Bug #20997], the C replacement
codegen functions aren't authored to handle block arguments (nor
should they because the extra code from the complexity defeats
optimization). Filter sites with VM_CALL_ARGS_BLOCKARG.

Co-Authored-By: Alan Wu &lt;alanwu@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re-initialize vm-&gt;ractor.sched.lock after fork (#11372)</title>
<updated>2024-08-14T17:19:53+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2024-08-14T17:19:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=66312ad913d67bfd3c2c83b174eabf537f5def84'/>
<id>66312ad913d67bfd3c2c83b174eabf537f5def84</id>
<content type='text'>
[Bug #20633] Re-initialize vm-&gt;ractor.sched.lock after fork

Previously under certain conditions it was possible to encounter a
deadlock in the forked child process if ractor.sched.lock was held.

Co-authored-by: Nathan Froyd &lt;froydnj@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20633] Re-initialize vm-&gt;ractor.sched.lock after fork

Previously under certain conditions it was possible to encounter a
deadlock in the forked child process if ractor.sched.lock was held.

Co-authored-by: Nathan Froyd &lt;froydnj@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Don't call `Warning.warn` unless the category is enabled (#10981)</title>
<updated>2024-06-13T17:02:32+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2024-06-13T17:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a3eb5e5c70eaee12964cdd807b8f19950003141f'/>
<id>a3eb5e5c70eaee12964cdd807b8f19950003141f</id>
<content type='text'>
Don't call `Warning.warn` unless the category is enabled

The warning category should be enabled if we want to call
`Warning.warn`.

This commit speeds up the following benchmark:

```ruby
eval "def test; " +
  1000.times.map { "'  '.chomp!" }.join(";") + "; end"

def run_benchmark count
  i = 0
  while i &lt; count
    start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
    yield
    ms = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
    puts "itr ##{i}: #{(ms * 1000).to_i}ms"
    i += 1
  end
end

run_benchmark(25) do
  250.times do
    test
  end
end
```

On `master` this runs at about 92ms per iteration. With this patch, it
is 7ms per iteration.

[Bug #20573]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't call `Warning.warn` unless the category is enabled

The warning category should be enabled if we want to call
`Warning.warn`.

This commit speeds up the following benchmark:

```ruby
eval "def test; " +
  1000.times.map { "'  '.chomp!" }.join(";") + "; end"

def run_benchmark count
  i = 0
  while i &lt; count
    start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
    yield
    ms = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
    puts "itr ##{i}: #{(ms * 1000).to_i}ms"
    i += 1
  end
end

run_benchmark(25) do
  250.times do
    test
  end
end
```

On `master` this runs at about 92ms per iteration. With this patch, it
is 7ms per iteration.

[Bug #20573]</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) f8abd24b1f28998157da1230b231419ef7b81722: [Backport #20522]</title>
<updated>2024-06-05T07:29:17+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-06-05T07:28:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e0fe6f70170924397b957d6cfa84774592b1c809'/>
<id>e0fe6f70170924397b957d6cfa84774592b1c809</id>
<content type='text'>
	Improve YJIT performance warning regression test

	[Bug #20522]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Improve YJIT performance warning regression test

	[Bug #20522]
</pre>
</div>
</content>
</entry>
<entry>
<title>[3.3 backport] Do not emit shape transition warnings when YJIT is compiling (#10911)</title>
<updated>2024-06-04T20:21:58+00:00</updated>
<author>
<name>Jean byroot Boussier</name>
<email>jean.boussier+github@shopify.com</email>
</author>
<published>2024-06-04T20:21:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4f00d98b327e3aa23564aa765488d15bc60c9e79'/>
<id>4f00d98b327e3aa23564aa765488d15bc60c9e79</id>
<content type='text'>
Do not emit shape transition warnings when YJIT is compiling

[Bug #20522]

If `Warning.warn` is redefined in Ruby, emitting a warning would invoke
Ruby code, which can't safely be done when YJIT is compiling.

Co-authored-by: Jean Boussier &lt;jean.boussier@gmail.com&gt;
Co-authored-by: Takashi Kokubun &lt;takashikkbn@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not emit shape transition warnings when YJIT is compiling

[Bug #20522]

If `Warning.warn` is redefined in Ruby, emitting a warning would invoke
Ruby code, which can't safely be done when YJIT is compiling.

Co-authored-by: Jean Boussier &lt;jean.boussier@gmail.com&gt;
Co-authored-by: Takashi Kokubun &lt;takashikkbn@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
