<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/tool/mk_builtin_loader.rb, 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) 18573b8d054f655e3e8b24902985bf4028f88810: [Backport #20178] (#9822)</title>
<updated>2024-02-04T04:13:15+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>nurse@users.noreply.github.com</email>
</author>
<published>2024-02-04T04:13:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ce6863a0cf971e0c0328e3fc85b10b6de36ecbad'/>
<id>ce6863a0cf971e0c0328e3fc85b10b6de36ecbad</id>
<content type='text'>
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 &lt;HParker@github.com&gt;
	---
	 bootstraptest/test_method.rb | 9 +++++++++
	 tool/mk_builtin_loader.rb    | 6 ++++++
	 2 files changed, 15 insertions(+)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;HParker@github.com&gt;
	---
	 bootstraptest/test_method.rb | 9 +++++++++
	 tool/mk_builtin_loader.rb    | 6 ++++++
	 2 files changed, 15 insertions(+)</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Introduce no_gc attribute (#7511)</title>
<updated>2023-03-14T22:38:58+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-03-14T22:38:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=70ba3102129dbaf6c943d1ed042103e0238842f4'/>
<id>70ba3102129dbaf6c943d1ed042103e0238842f4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>RJIT: Introduce constants under RubyVM::RJIT::C</title>
<updated>2023-03-12T05:48:28+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-03-12T05:31:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=50c5f94ed71707030f03ef1ce699367f021e0aa3'/>
<id>50c5f94ed71707030f03ef1ce699367f021e0aa3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename builtin attr :inline to :leaf</title>
<updated>2023-03-11T22:25:12+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-03-11T22:25:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=94da5f7c360b64e12c55fa0be266d9f48e66e937'/>
<id>94da5f7c360b64e12c55fa0be266d9f48e66e937</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Support multiple attributes with Primitive.attr!</title>
<updated>2023-03-11T22:19:46+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-03-11T21:32:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0c0c88d383a09fef18d8cf8a1457d1649a2cbd46'/>
<id>0c0c88d383a09fef18d8cf8a1457d1649a2cbd46</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Change the syntax of Primitive.attr! to Symbol (#7501)</title>
<updated>2023-03-11T07:40:57+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-03-11T07:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3a02c7818cb6cbcc70957dfc449ebf32f9dd9e0b'/>
<id>3a02c7818cb6cbcc70957dfc449ebf32f9dd9e0b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove MJIT's builtin function compiler</title>
<updated>2023-03-08T07:16:24+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-03-08T07:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e93e780f3d37705a26a9160c60cc92255c1ff60a'/>
<id>e93e780f3d37705a26a9160c60cc92255c1ff60a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>s/mjit/rjit/</title>
<updated>2023-03-07T07:44:01+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-03-07T07:17:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=23ec248e48f696ae986e2b19cd572ece02a5ba55'/>
<id>23ec248e48f696ae986e2b19cd572ece02a5ba55</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use class methods of `File` over `Kernel.open` and `IO.read`</title>
<updated>2022-11-30T17:28:49+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-11-25T05:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d752cf7601adbe4bc2dc658effc2f61563a7dfb7'/>
<id>d752cf7601adbe4bc2dc658effc2f61563a7dfb7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MJIT: Use a String buffer in builtin compilers</title>
<updated>2022-11-28T05:11:33+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-27T23:15:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6844bcc6b4cdc50def1c0d30d4e8b5045fb43443'/>
<id>6844bcc6b4cdc50def1c0d30d4e8b5045fb43443</id>
<content type='text'>
instead of FILE*.

Using C.fprintf is slower than String manipulation on memory. I'm going
to change the way MJIT writes files, and this is a prerequisite for it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
instead of FILE*.

Using C.fprintf is slower than String manipulation on memory. I'm going
to change the way MJIT writes files, and this is a prerequisite for it.
</pre>
</div>
</content>
</entry>
</feed>
