<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_iseq.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[3.4] compile.c: Handle anonymous variables in `outer_variable_cmp` (#13493)</title>
<updated>2025-09-16T21:17:51+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-09-16T21:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6882012473b3bd3a9eb53ad7f7754144c0e63ef0'/>
<id>6882012473b3bd3a9eb53ad7f7754144c0e63ef0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "merge revision(s) ff222ac27afe712ef6ec2bb74c81cdde1a1fa176: [Backport #21370]"</title>
<updated>2025-07-14T21:17:12+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-07-14T21:16:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3a06b3d9f51bc4a3eef5fbaa035595ed34d65eba'/>
<id>3a06b3d9f51bc4a3eef5fbaa035595ed34d65eba</id>
<content type='text'>
This reverts commit acb19e8707093593e967b6af03d92da5c570ffc6.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit acb19e8707093593e967b6af03d92da5c570ffc6.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 34b407a4a89e69dd04f692e2b29efa2816d4664a: [Backport #21394]</title>
<updated>2025-07-14T20:55:05+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-07-14T20:55:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c397c2d177a0b7fd13b69c5109418fbe1f9eccd1'/>
<id>c397c2d177a0b7fd13b69c5109418fbe1f9eccd1</id>
<content type='text'>
	Fix memory leak in Prism's RubyVM::InstructionSequence.new

	[Bug #21394]

	There are two ways to make RubyVM::InstructionSequence.new raise which
	would cause the options-&gt;scopes to leak memory:

	1. Passing in any (non T_FILE) object where the to_str raises.
	2. Passing in a T_FILE object where String#initialize_dup raises. This is
	   because rb_io_path dups the string.

	Example 1:

	    10.times do
	      100_000.times do
	        RubyVM::InstructionSequence.new(nil)
	      rescue TypeError
	      end

	      puts `ps -o rss= -p #{$$}`
	    end

	Before:

	    13392
	    17104
	    20256
	    23920
	    27264
	    30432
	    33584
	    36752
	    40032
	    43232

	After:

	    9392
	    11072
	    11648
	    11648
	    11648
	    11712
	    11712
	    11712
	    11744
	    11744

	Example 2:

	    require "tempfile"

	    MyError = Class.new(StandardError)
	    String.prepend(Module.new do
	      def initialize_dup(_)
	        if $raise_on_dup
	          raise MyError
	        else
	          super
	        end
	      end
	    end)

	    Tempfile.create do |f|
	      10.times do
	        100_000.times do
	          $raise_on_dup = true
	          RubyVM::InstructionSequence.new(f)
	        rescue MyError
	        else
	          raise "MyError was not raised during RubyVM::InstructionSequence.new"
	        end

	        puts `ps -o rss= -p #{$$}`
	      ensure
	        $raise_on_dup = false
	      end
	    end

	Before:

	    14080
	    18512
	    22000
	    25184
	    28320
	    31600
	    34736
	    37904
	    41088
	    44256

	After:

	    12016
	    12464
	    12880
	    12880
	    12880
	    12912
	    12912
	    12912
	    12912
	    12912
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix memory leak in Prism's RubyVM::InstructionSequence.new

	[Bug #21394]

	There are two ways to make RubyVM::InstructionSequence.new raise which
	would cause the options-&gt;scopes to leak memory:

	1. Passing in any (non T_FILE) object where the to_str raises.
	2. Passing in a T_FILE object where String#initialize_dup raises. This is
	   because rb_io_path dups the string.

	Example 1:

	    10.times do
	      100_000.times do
	        RubyVM::InstructionSequence.new(nil)
	      rescue TypeError
	      end

	      puts `ps -o rss= -p #{$$}`
	    end

	Before:

	    13392
	    17104
	    20256
	    23920
	    27264
	    30432
	    33584
	    36752
	    40032
	    43232

	After:

	    9392
	    11072
	    11648
	    11648
	    11648
	    11712
	    11712
	    11712
	    11744
	    11744

	Example 2:

	    require "tempfile"

	    MyError = Class.new(StandardError)
	    String.prepend(Module.new do
	      def initialize_dup(_)
	        if $raise_on_dup
	          raise MyError
	        else
	          super
	        end
	      end
	    end)

	    Tempfile.create do |f|
	      10.times do
	        100_000.times do
	          $raise_on_dup = true
	          RubyVM::InstructionSequence.new(f)
	        rescue MyError
	        else
	          raise "MyError was not raised during RubyVM::InstructionSequence.new"
	        end

	        puts `ps -o rss= -p #{$$}`
	      ensure
	        $raise_on_dup = false
	      end
	    end

	Before:

	    14080
	    18512
	    22000
	    25184
	    28320
	    31600
	    34736
	    37904
	    41088
	    44256

	After:

	    12016
	    12464
	    12880
	    12880
	    12880
	    12912
	    12912
	    12912
	    12912
	    12912
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) ff222ac27afe712ef6ec2bb74c81cdde1a1fa176: [Backport #21370]</title>
<updated>2025-07-14T20:54:31+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-07-14T20:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=acb19e8707093593e967b6af03d92da5c570ffc6'/>
<id>acb19e8707093593e967b6af03d92da5c570ffc6</id>
<content type='text'>
	compile.c: Handle anonymous variables in `outer_variable_cmp`

	[Bug #21370]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	compile.c: Handle anonymous variables in `outer_variable_cmp`

	[Bug #21370]
</pre>
</div>
</content>
</entry>
<entry>
<title>Have `ast` live longer in ISeq.compile_file to fix GC stress crash</title>
<updated>2025-03-14T19:04:25+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2025-03-11T17:14:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=31502b0d8569b806d723a0e49a919921bf5d6e2c'/>
<id>31502b0d8569b806d723a0e49a919921bf5d6e2c</id>
<content type='text'>
Previously, live range of `ast_value` ended on the call right before
rb_ast_dispose(), which led to premature collection and use-after-free.

We observed this crashing on -O3, -DVM_CHECK_MODE, with GCC 11.4.0 on
Ubuntu.

Co-authored-by: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, live range of `ast_value` ended on the call right before
rb_ast_dispose(), which led to premature collection and use-after-free.

We observed this crashing on -O3, -DVM_CHECK_MODE, with GCC 11.4.0 on
Ubuntu.

Co-authored-by: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>RubyVM::InstructionSequence.of Thread::Backtrace::Location</title>
<updated>2024-10-16T18:31:26+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-10-15T14:06:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5eca11ca5e5503e41b7ec81f03e63c59556c038c'/>
<id>5eca11ca5e5503e41b7ec81f03e63c59556c038c</id>
<content type='text'>
This would be useful for debugging.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This would be useful for debugging.
</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent warnings: assigned but unused variable</title>
<updated>2024-09-15T01:05:57+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2024-09-15T01:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bc13ec735b33771c279e67e4143fa8e98a8252fd'/>
<id>bc13ec735b33771c279e67e4143fa8e98a8252fd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Implement unused block warning</title>
<updated>2024-08-21T15:37:13+00:00</updated>
<author>
<name>eileencodes</name>
<email>eileencodes@gmail.com</email>
</author>
<published>2024-08-20T17:34:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7ad74d1686b626b72228e3d24d5448adcfe23d48'/>
<id>7ad74d1686b626b72228e3d24d5448adcfe23d48</id>
<content type='text'>
Related: ruby/prism#2935
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Related: ruby/prism#2935
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix next inside block argument stack underflow</title>
<updated>2024-08-12T09:09:32+00:00</updated>
<author>
<name>tompng</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-08-06T14:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=992596fb7af18a7f472589a607d0eb3fbb03b49a'/>
<id>992596fb7af18a7f472589a607d0eb3fbb03b49a</id>
<content type='text'>
[Bug #20344]
Fix compile_next adding removable adjust label
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20344]
Fix compile_next adding removable adjust label
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix wrong unreachable chunk remove when jump destination label is unremovable</title>
<updated>2024-07-30T06:31:58+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-07-30T06:31:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1870505f478cc75993b296b7144a45137ace6937'/>
<id>1870505f478cc75993b296b7144a45137ace6937</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
