<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git, branch v3_3_2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>v3.3.2</title>
<updated>2024-05-30T00:23:11+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-30T00:23:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e5a195edf62fe1bf7146a191da13fa1c4fecbd71'/>
<id>e5a195edf62fe1bf7146a191da13fa1c4fecbd71</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) ce20367a0e2f1fcfabebf3b6bea732fc71fa79f7: [Backport #20500]</title>
<updated>2024-05-30T00:11:36+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-30T00:11:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a9b6a7bf7204cd1244da7e05fafea721cf3b2e4f'/>
<id>a9b6a7bf7204cd1244da7e05fafea721cf3b2e4f</id>
<content type='text'>
	Define `incflags` also on mswin
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Define `incflags` also on mswin
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 5fa6ba9568e87e43e08a4daeba1572254c589fb1: [Backport #20500]</title>
<updated>2024-05-29T23:53:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T23:53:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a96233161a0e917b57c3c2cd9598d75d8b7721f5'/>
<id>a96233161a0e917b57c3c2cd9598d75d8b7721f5</id>
<content type='text'>
	[Bug #20500] Search non-default directories for jemalloc

	Co-Authored-by: lish82 (Hiroki Katagiri)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20500] Search non-default directories for jemalloc

	Co-Authored-by: lish82 (Hiroki Katagiri)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 1faeb44dfcf777ace28321e80d0ebf942161a0a7,7f87ad9fc4bc45faf8cd33602a025f27c094b2fd: [Backport #20431]</title>
<updated>2024-05-29T23:50:13+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T23:50:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b2eb7f47b3e5f5a4681aa364ed960a0809460cdb'/>
<id>b2eb7f47b3e5f5a4681aa364ed960a0809460cdb</id>
<content type='text'>
	Check if macros are defined before using

	Assume macros with the same prefix would be defined together.

	Refer autoconfigured endian macro (#10572)

	Remove the case `RB_IO_BUFFER_HOST_ENDIAN` is not defined.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Check if macros are defined before using

	Assume macros with the same prefix would be defined together.

	Refer autoconfigured endian macro (#10572)

	Remove the case `RB_IO_BUFFER_HOST_ENDIAN` is not defined.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) ef3803ed4028810f9088019f0db1a366370ab53a: [Backport #20502]</title>
<updated>2024-05-29T23:48:51+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T23:48:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d65da20eb4ebf5fcbc7cd0333e1406e1dd3c373b'/>
<id>d65da20eb4ebf5fcbc7cd0333e1406e1dd3c373b</id>
<content type='text'>
	Ignore the result of pthread_kill in ubf_wakeup_thread

	After an upgrade to Ruby 3.3.0, I experienced reproducible production crashes
	of the form:

	[BUG] pthread_kill: No such process (ESRCH)

	This is the only pthread_kill call in Ruby. The result of pthread_kill was
	previously ignored in Ruby 3.2 and below. Checking the result was added in
	be1bbd5b7d40ad863ab35097765d3754726bbd54 (MaNy).

	I have not yet been able to create a minimal self-contained example,
	but it should be safe to remove the checks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Ignore the result of pthread_kill in ubf_wakeup_thread

	After an upgrade to Ruby 3.3.0, I experienced reproducible production crashes
	of the form:

	[BUG] pthread_kill: No such process (ESRCH)

	This is the only pthread_kill call in Ruby. The result of pthread_kill was
	previously ignored in Ruby 3.2 and below. Checking the result was added in
	be1bbd5b7d40ad863ab35097765d3754726bbd54 (MaNy).

	I have not yet been able to create a minimal self-contained example,
	but it should be safe to remove the checks.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) bc002971b6ad483dbf69b8a275c44412bb6ab954: [Backport #20094]</title>
<updated>2024-05-29T23:35:18+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T23:34:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0044b6aefc656874adb9266829f19870dcd3d75e'/>
<id>0044b6aefc656874adb9266829f19870dcd3d75e</id>
<content type='text'>
	[Bug #20094] Distinguish `begin` and parentheses
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20094] Distinguish `begin` and parentheses
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b: [Backport #20494]</title>
<updated>2024-05-29T23:18:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T23:18:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b3f2ccea5efb060e99d289b2272ddfe413e4f051'/>
<id>b3f2ccea5efb060e99d289b2272ddfe413e4f051</id>
<content type='text'>
	[Bug #20494] Search non-default directories for GMP

	Co-Authored-by: lish82 (Hiroki Katagiri)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20494] Search non-default directories for GMP

	Co-Authored-by: lish82 (Hiroki Katagiri)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) d292a9b98ce03c76dbe13138d20b9fbf613cc02d: [Backport #20453]</title>
<updated>2024-05-29T22:52:15+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T22:52:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cf643fabd5c564c1dfeb337b50b4aa76ebaa11c1'/>
<id>cf643fabd5c564c1dfeb337b50b4aa76ebaa11c1</id>
<content type='text'>
	[Bug #20453] segfault in Regexp timeout

	https://bugs.ruby-lang.org/issues/20228 started freeing `stk_base` to
	avoid a memory leak. But `stk_base` is sometimes stack allocated (using
	`xalloca`), so the free only works if the regex stack has grown enough
	to hit `stack_double` (which uses `xmalloc` and `xrealloc`).

	To reproduce the problem on master and 3.3.1:

	```ruby
	Regexp.timeout = 0.001
	/^(a*)x$/ =~ "a" * 1000000 + "x"'
	```

	Some details about this potential fix:

	`stk_base == stk_alloc` on
	[init](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1153),
	so if `stk_base != stk_alloc` we can be sure we called
	[`stack_double`](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1210)
	and it's safe to free. It's also safe to free if we've
	[saved](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1187-L1189)
	the stack to `msa-&gt;stack_p`, since we do the `stk_base != stk_alloc`
	check before saving.

	This matches the check we do inside
	[`stack_double`](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1221)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20453] segfault in Regexp timeout

	https://bugs.ruby-lang.org/issues/20228 started freeing `stk_base` to
	avoid a memory leak. But `stk_base` is sometimes stack allocated (using
	`xalloca`), so the free only works if the regex stack has grown enough
	to hit `stack_double` (which uses `xmalloc` and `xrealloc`).

	To reproduce the problem on master and 3.3.1:

	```ruby
	Regexp.timeout = 0.001
	/^(a*)x$/ =~ "a" * 1000000 + "x"'
	```

	Some details about this potential fix:

	`stk_base == stk_alloc` on
	[init](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1153),
	so if `stk_base != stk_alloc` we can be sure we called
	[`stack_double`](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1210)
	and it's safe to free. It's also safe to free if we've
	[saved](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1187-L1189)
	the stack to `msa-&gt;stack_p`, since we do the `stk_base != stk_alloc`
	check before saving.

	This matches the check we do inside
	[`stack_double`](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1221)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 6ade36c06b7cef948099b8f5f483763498705d12: [Backport #20414]</title>
<updated>2024-05-29T22:47:26+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T22:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5c06e930748ef6bdb4ac4751ba16b7b604da3db0'/>
<id>5c06e930748ef6bdb4ac4751ba16b7b604da3db0</id>
<content type='text'>
	`Fiber#raise` recursively raises on nested resuming_fiber. (#10482)

	* Improve consistency of `Fiber.current.raise`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	`Fiber#raise` recursively raises on nested resuming_fiber. (#10482)

	* Improve consistency of `Fiber.current.raise`.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) c479492a6701dcef3d3a96de8946ecf7beb079d4: [Backport #20427]</title>
<updated>2024-05-29T22:44:55+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T22:44:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b44c02ad5a1c5c8c1c62b83eec96cf3a8a2107bc'/>
<id>b44c02ad5a1c5c8c1c62b83eec96cf3a8a2107bc</id>
<content type='text'>
	Resize ary when `Array#sort!` block modifies embedded ary

	In cases where `rb_ary_sort_bang` is called with a block and
	tmp is an embedded array, we need to account for the block
	potentially impacting the capacity of ary.

	ex:
	```
	var_0 = (1..70).to_a
	var_0.sort! do |var_0_block_129, var_1_block_129|
	  var_0.pop
	  var_1_block_129 &lt;=&gt; var_0_block_129
	end.shift(3)
	```

	The above example can put the array into a corrupted state
	resulting in a heap buffer overflow and possible segfault:
	```
	ERROR: AddressSanitizer: heap-buffer-overflow on address [...]
	WRITE of size 560 at 0x60b0000034f0 thread T0 [...]
	```

	This commit adds a conditional to determine when the capacity
	of ary has been modified by the provided block. If this is
	the case, ensure that the capacity of ary is adjusted to
	handle at minimum the len of tmp.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Resize ary when `Array#sort!` block modifies embedded ary

	In cases where `rb_ary_sort_bang` is called with a block and
	tmp is an embedded array, we need to account for the block
	potentially impacting the capacity of ary.

	ex:
	```
	var_0 = (1..70).to_a
	var_0.sort! do |var_0_block_129, var_1_block_129|
	  var_0.pop
	  var_1_block_129 &lt;=&gt; var_0_block_129
	end.shift(3)
	```

	The above example can put the array into a corrupted state
	resulting in a heap buffer overflow and possible segfault:
	```
	ERROR: AddressSanitizer: heap-buffer-overflow on address [...]
	WRITE of size 560 at 0x60b0000034f0 thread T0 [...]
	```

	This commit adds a conditional to determine when the capacity
	of ary has been modified by the provided block. If this is
	the case, ensure that the capacity of ary is adjusted to
	handle at minimum the len of tmp.
</pre>
</div>
</content>
</entry>
</feed>
