<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/yjit/src/core.rs, 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>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>YJIT: Fix off-by-one in Kernel#send type handling (#9212)</title>
<updated>2023-12-12T22:10:14+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2023-12-12T22:10:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d4bbee7475269972cf56ebd3b5e4dc9905789663'/>
<id>d4bbee7475269972cf56ebd3b5e4dc9905789663</id>
<content type='text'>
Previously, if the method ID argument happens to be on one below the top
of the stack, we didn't overwrite the type of the stack slot, which
leaves an incorrect type for the stack slot. The included script tripped
asserts both with and without --yjit-verify-ctx.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, if the method ID argument happens to be on one below the top
of the stack, we didn't overwrite the type of the stack slot, which
leaves an incorrect type for the stack slot. The included script tripped
asserts both with and without --yjit-verify-ctx.</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Fix on-stack ISEQ comparison for auto_compact (#9164)</title>
<updated>2023-12-07T22:53:05+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-12-07T22:53:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ac5fd58700b5576bfdd89ffe06dd4302b6721e5f'/>
<id>ac5fd58700b5576bfdd89ffe06dd4302b6721e5f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Avoid register allocation conflict with a higher stack_idx (#9143)</title>
<updated>2023-12-06T20:19:43+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-12-06T20:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a439fc2f175f5c272886a7be57c6444015450401'/>
<id>a439fc2f175f5c272886a7be57c6444015450401</id>
<content type='text'>
YJIT: Avoid register allocation conflict

with a higher stack_idx</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
YJIT: Avoid register allocation conflict

with a higher stack_idx</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Mark and update stubs in invalidated blocks (#9104)</title>
<updated>2023-12-04T15:13:40+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2023-12-04T15:13:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b5a62eb9abf7a69e6a7288eba880652d7cd075a4'/>
<id>b5a62eb9abf7a69e6a7288eba880652d7cd075a4</id>
<content type='text'>
Like in the example given in delayed_deallocation(), stubs can be hit
even if the block housing it is invalidated. Mark them so we don't
work with invalidate ISeqs when hitting these stubs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Like in the example given in delayed_deallocation(), stubs can be hit
even if the block housing it is invalidated. Mark them so we don't
work with invalidate ISeqs when hitting these stubs.</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Bump ec-&gt;cfp after setting cfp-&gt;jit_return (#9072)</title>
<updated>2023-11-30T16:23:25+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-11-30T16:23:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d048bae96b4108104cd0e77aad44962a39a5796f'/>
<id>d048bae96b4108104cd0e77aad44962a39a5796f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Assert no patch overlap on pos_marker (#9048)</title>
<updated>2023-11-28T15:41:14+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-11-28T15:41:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=476a231e7e2c2a370ea9f47c9b62e8d6d3d9442d'/>
<id>476a231e7e2c2a370ea9f47c9b62e8d6d3d9442d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: shrink `Context` down to 15 bytes (#8911)</title>
<updated>2023-11-13T22:14:24+00:00</updated>
<author>
<name>Maxime Chevalier-Boisvert</name>
<email>maxime.chevalierboisvert@shopify.com</email>
</author>
<published>2023-11-13T22:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c552a5f7b0d2ace0760499e88ad58e3b7711a267'/>
<id>c552a5f7b0d2ace0760499e88ad58e3b7711a267</id>
<content type='text'>
* WIP context refactoring

* Refactor to remove Context.temp_mapping</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* WIP context refactoring

* Refactor to remove Context.temp_mapping</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Take cargo --fix for unnecessary calls to into()</title>
<updated>2023-11-10T21:55:56+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2023-11-10T20:47:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8dfbfa15f6d0d8677cd1b4adb192643a05d02411'/>
<id>8dfbfa15f6d0d8677cd1b4adb192643a05d02411</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Auto fix for clippy::unnecessary_cast</title>
<updated>2023-11-10T21:55:56+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2023-11-10T20:26:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=408d5886cf653c1fbf51880095766fd54da737d2'/>
<id>408d5886cf653c1fbf51880095766fd54da737d2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
