<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/vm.c, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Store ractor_id directly on EC</title>
<updated>2025-12-18T21:43:45+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2025-12-17T20:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=63b082cf0e87942dcea28cbdeb1c8a9e616e903a'/>
<id>63b082cf0e87942dcea28cbdeb1c8a9e616e903a</id>
<content type='text'>
This is easier to access as ec-&gt;ractor_id instead of pointer-chasing through
ec-&gt;thread-&gt;ractor-&gt;ractor_id

Co-authored-by: Luke Gruber &lt;luke.gru@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is easier to access as ec-&gt;ractor_id instead of pointer-chasing through
ec-&gt;thread-&gt;ractor-&gt;ractor_id

Co-authored-by: Luke Gruber &lt;luke.gru@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix env debug assertion failure w/ Ractors+JITs</title>
<updated>2025-12-18T19:03:23+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2025-12-18T04:21:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=28c2a5b2a4db5ed6faa7cf3d71baf2765a277184'/>
<id>28c2a5b2a4db5ed6faa7cf3d71baf2765a277184</id>
<content type='text'>
Previously when using a JIT and Ractors at the same time with debug
assertions turned on this could rarely fail with:

    vm_core.h:1448: Assertion Failed: VM_ENV_FLAGS:FIXNUM_P(flags)

When using Ractors, any time the VM lock is acquired, that may join a
barrier as another Ractor initiates GC. This could be made to happen
reliably by replacing the invalidation with a call to rb_gc().

This assertion failure happens because

    VM_STACK_ENV_WRITE(ep, 0, (VALUE)env);

Is setting VM_ENV_DATA_INDEX_FLAGS to the environment, which is not a
valid set of flags (it should be a fixnum). Although we update cfp-&gt;ep,
rb_execution_context_mark will also mark the PREV_EP, and until the
recursive calls to vm_make_env_each all finish the "next" ep may still
be pointing to the stack env we've just escaped.

I'm not completely sure why we need to store this on the stack - why is
setting cfp-&gt;ep not enough? I'm also not sure why
rb_execution_context_mark needs to mark the prev_ep.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously when using a JIT and Ractors at the same time with debug
assertions turned on this could rarely fail with:

    vm_core.h:1448: Assertion Failed: VM_ENV_FLAGS:FIXNUM_P(flags)

When using Ractors, any time the VM lock is acquired, that may join a
barrier as another Ractor initiates GC. This could be made to happen
reliably by replacing the invalidation with a call to rb_gc().

This assertion failure happens because

    VM_STACK_ENV_WRITE(ep, 0, (VALUE)env);

Is setting VM_ENV_DATA_INDEX_FLAGS to the environment, which is not a
valid set of flags (it should be a fixnum). Although we update cfp-&gt;ep,
rb_execution_context_mark will also mark the PREV_EP, and until the
recursive calls to vm_make_env_each all finish the "next" ep may still
be pointing to the stack env we've just escaped.

I'm not completely sure why we need to store this on the stack - why is
setting cfp-&gt;ep not enough? I'm also not sure why
rb_execution_context_mark needs to mark the prev_ep.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make tracepoints with set_trace_func or TracePoint.new ractor local (#15468)</title>
<updated>2025-12-16T19:06:55+00:00</updated>
<author>
<name>Luke Gruber</name>
<email>luke.gruber@shopify.com</email>
</author>
<published>2025-12-16T19:06:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4fb537b1ee28bb37dbe551ac65c279d436c756bc'/>
<id>4fb537b1ee28bb37dbe551ac65c279d436c756bc</id>
<content type='text'>
Before this change, GC'ing any Ractor object caused you to lose all
enabled tracepoints across all ractors (even main). Now tracepoints are
ractor-local and this doesn't happen. Internal events are still global.

Fixes [Bug #19112]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this change, GC'ing any Ractor object caused you to lose all
enabled tracepoints across all ractors (even main). Now tracepoints are
ractor-local and this doesn't happen. Internal events are still global.

Fixes [Bug #19112]</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent ifunc procs from being made shareable</title>
<updated>2025-12-12T19:27:37+00:00</updated>
<author>
<name>Étienne Barrié</name>
<email>etienne.barrie@gmail.com</email>
</author>
<published>2025-12-11T15:46:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5903ed7ba9ca60546aa0dd97e92b3d381b7918d3'/>
<id>5903ed7ba9ca60546aa0dd97e92b3d381b7918d3</id>
<content type='text'>
[Bug #21775]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21775]
</pre>
</div>
</content>
</entry>
<entry>
<title>Register internal tracepoints globally</title>
<updated>2025-12-09T00:38:45+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2025-12-03T08:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=de94f88c6820c94b69df3343c6050cdb8cc0610e'/>
<id>de94f88c6820c94b69df3343c6050cdb8cc0610e</id>
<content type='text'>
Internal tracepoints only make sense to run globally, and they already
took completely different paths.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Internal tracepoints only make sense to run globally, and they already
took completely different paths.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add BOP_GTGT</title>
<updated>2025-12-01T23:19:26+00:00</updated>
<author>
<name>Max Bernstein</name>
<email>ruby@bernsteinbear.com</email>
</author>
<published>2025-11-25T03:44:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a25196395e7502e4d6faad0856c697690d8a202e'/>
<id>a25196395e7502e4d6faad0856c697690d8a202e</id>
<content type='text'>
This will help JITs (and maybe later the interpreter) optimize
Integer#&gt;&gt;.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will help JITs (and maybe later the interpreter) optimize
Integer#&gt;&gt;.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `rb_ec_close` function to manage execution context cleanup. (#15253)</title>
<updated>2025-12-01T04:49:31+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@shopify.com</email>
</author>
<published>2025-12-01T04:49:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bc9ea585bee075480b4f12f84c8ab99315766595'/>
<id>bc9ea585bee075480b4f12f84c8ab99315766595</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert miscommit at "Reset the cache variable before retrying"</title>
<updated>2025-11-26T02:35:15+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-11-26T02:34:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2f53985da9ee593fe524d408256835667938c7d7'/>
<id>2f53985da9ee593fe524d408256835667938c7d7</id>
<content type='text'>
This reverts commit 26a9e0b4e31f7b5a9cbd755e0a15823a8fa51bae partially.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 26a9e0b4e31f7b5a9cbd755e0a15823a8fa51bae partially.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reset the cache variable before retrying</title>
<updated>2025-11-26T01:47:17+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-11-26T01:47:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=26a9e0b4e31f7b5a9cbd755e0a15823a8fa51bae'/>
<id>26a9e0b4e31f7b5a9cbd755e0a15823a8fa51bae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Box: mark/move Box object referred via ENV/rb_env_t</title>
<updated>2025-11-26T01:10:47+00:00</updated>
<author>
<name>Satoshi Tagomori</name>
<email>s-tagomori@sakura.ad.jp</email>
</author>
<published>2025-11-25T15:36:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e84b91a292f3cd94fdf5f2ef548bf2377b1cf537'/>
<id>e84b91a292f3cd94fdf5f2ef548bf2377b1cf537</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
