<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/eval.c, branch v3_2_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) 58918788abd63901588e4aa1e39b5c057321c10a: [Backport #20342]</title>
<updated>2024-07-15T08:56:01+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-15T08:56:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b72deb7ca1198f8c799cd5e7e44635cf50abd7ec'/>
<id>b72deb7ca1198f8c799cd5e7e44635cf50abd7ec</id>
<content type='text'>
	[Bug #20342] Consider wrapped load in `main` methods
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20342] Consider wrapped load in `main` methods
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 02a7e12b80823919fb614ad3ea6241d5115d14fe: [Backport #19593]</title>
<updated>2023-07-17T07:09:00+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2023-07-17T07:09:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5fc9825ccf651664c547b1822c7f753464e27f06'/>
<id>5fc9825ccf651664c547b1822c7f753464e27f06</id>
<content type='text'>
	Ensure throw data is not set as cause

	[Bug #19593]

	rb_ec_setup_exception did not check if errinfo is a throw_data. This can
	cause crashes in code since it is assumed that id_cause is an object.

	We saw a crash in show_cause due to id_cause of errinfo being a
	throw_data. It crashes on rb_obj_is_kind_of since it cannot be called on
	T_IMEMO objects.

	Unfortunately, we couldn't find a reproduction script, however we
	debugged the core dump and rb_ec_setup_exception is the only place where
	id_cause is assigned from errinfo without checking if it is a
	throw_data.

	```
	0x0000556c5708e6dd in sigsegv (sig=11, info=0x7f301befa3f0, ctx=0x7f301befa2c0) at signal.c:964
	0x00007f301d046420 in &lt;signal handler called&gt; () at /lib/x86_64-linux-gnu/libpthread.so.0
	class_search_class_ancestor (c=139844586301760, cl=&lt;optimized out&gt;) at object.c:810
	rb_obj_is_kind_of (obj=obj@entry=139839221734880, c=139844586301760) at object.c:861
	0x0000556c56f2f00f in show_cause
	    (errinfo=errinfo@entry=139838840645160, str=str@entry=139839221730520, opt=139839221730480, highlight=0, reverse=reverse@entry=0, backtrace_limit=backtrace_limit@entry=-1, shown_causes=0x7ffe9d1a2d68) at ./include/ruby/internal/special_consts.h:175
	```

	Co-Authored-By: Jean Boussier &lt;byroot@ruby-lang.org&gt;
	---
	 eval.c | 4 ++++
	 1 file changed, 4 insertions(+)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Ensure throw data is not set as cause

	[Bug #19593]

	rb_ec_setup_exception did not check if errinfo is a throw_data. This can
	cause crashes in code since it is assumed that id_cause is an object.

	We saw a crash in show_cause due to id_cause of errinfo being a
	throw_data. It crashes on rb_obj_is_kind_of since it cannot be called on
	T_IMEMO objects.

	Unfortunately, we couldn't find a reproduction script, however we
	debugged the core dump and rb_ec_setup_exception is the only place where
	id_cause is assigned from errinfo without checking if it is a
	throw_data.

	```
	0x0000556c5708e6dd in sigsegv (sig=11, info=0x7f301befa3f0, ctx=0x7f301befa2c0) at signal.c:964
	0x00007f301d046420 in &lt;signal handler called&gt; () at /lib/x86_64-linux-gnu/libpthread.so.0
	class_search_class_ancestor (c=139844586301760, cl=&lt;optimized out&gt;) at object.c:810
	rb_obj_is_kind_of (obj=obj@entry=139839221734880, c=139844586301760) at object.c:861
	0x0000556c56f2f00f in show_cause
	    (errinfo=errinfo@entry=139838840645160, str=str@entry=139839221730520, opt=139839221730480, highlight=0, reverse=reverse@entry=0, backtrace_limit=backtrace_limit@entry=-1, shown_causes=0x7ffe9d1a2d68) at ./include/ruby/internal/special_consts.h:175
	```

	Co-Authored-By: Jean Boussier &lt;byroot@ruby-lang.org&gt;
	---
	 eval.c | 4 ++++
	 1 file changed, 4 insertions(+)
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #19242] Prohibit circular causes to be loaded</title>
<updated>2022-12-20T05:12:38+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-12-19T05:10:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2e7e153a2af1456515d43b6381e38534b069b1c2'/>
<id>2e7e153a2af1456515d43b6381e38534b069b1c2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>The mode flags may be clobbered by tag jumps</title>
<updated>2022-11-25T06:50:06+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-11-25T04:49:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=45bad8c7b8851a179515407d7ee2ed70545e4b40'/>
<id>45bad8c7b8851a179515407d7ee2ed70545e4b40</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #19016] re-order error handling at cleanup</title>
<updated>2022-11-21T15:33:19+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-11-11T01:37:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5b959e238e5b7c18d6a1a5f5d9b4b2063de628fe'/>
<id>5b959e238e5b7c18d6a1a5f5d9b4b2063de628fe</id>
<content type='text'>
Build and store the error message with `#detailed_message` before
terminating all Ractors, then show the message later.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Build and store the error message with `#detailed_message` before
terminating all Ractors, then show the message later.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #19016] Handle syntax error in main script like other errors</title>
<updated>2022-11-20T11:00:40+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-11-18T09:22:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=701dfe4eb741628213e4d701c13ad6d76904ac4f'/>
<id>701dfe4eb741628213e4d701c13ad6d76904ac4f</id>
<content type='text'>
So that `SyntaxError#detailed_message` will be used also in the case
exiting by such syntax error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So that `SyntaxError#detailed_message` will be used also in the case
exiting by such syntax error.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use `enum ruby_tag_type` over `int`</title>
<updated>2022-11-20T11:00:40+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-11-18T09:19:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=12b7b852272c23d8449af507405ac93cedcb6dd6'/>
<id>12b7b852272c23d8449af507405ac93cedcb6dd6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Using UNDEF_P macro</title>
<updated>2022-11-16T09:58:33+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2022-11-15T04:24:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6'/>
<id>1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MJIT: Stop using the VM barrier for jit_cont</title>
<updated>2022-10-20T00:20:48+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-10-20T00:18:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d9d9005a3a31d0df0b5432eba5d6f2b9bd647cb1'/>
<id>d9d9005a3a31d0df0b5432eba5d6f2b9bd647cb1</id>
<content type='text'>
This solves multiple problems.

First, RB_VM_LOCK_ENTER/LEAVE is a barrier. We could at least use the
_NO_BARRIER variant.

Second, this doesn't need to interfere with GC or other GVL users when
multiple Ractors are used. This needs to be used in very few places, so
the benefit of fine-grained locking would outweigh its small maintenance
cost.

Third, it fixes a crash for YJIT. Because YJIT is never disabled until a
process exits unlike MJIT that finishes earlier, we could call jit_cont_free
when EC no longer exists, which crashes RB_VM_LOCK_ENTER.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This solves multiple problems.

First, RB_VM_LOCK_ENTER/LEAVE is a barrier. We could at least use the
_NO_BARRIER variant.

Second, this doesn't need to interfere with GC or other GVL users when
multiple Ractors are used. This needs to be used in very few places, so
the benefit of fine-grained locking would outweigh its small maintenance
cost.

Third, it fixes a crash for YJIT. Because YJIT is never disabled until a
process exits unlike MJIT that finishes earlier, we could call jit_cont_free
when EC no longer exists, which crashes RB_VM_LOCK_ENTER.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make mjit_cont sharable with YJIT (#6556)</title>
<updated>2022-10-17T16:27:59+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-10-17T16:27:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e7c71c6c9271b0c29f210769159090e17128e740'/>
<id>e7c71c6c9271b0c29f210769159090e17128e740</id>
<content type='text'>
* Make mjit_cont sharable with YJIT

* Update dependencies

* Update YJIT binding</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Make mjit_cont sharable with YJIT

* Update dependencies

* Update YJIT binding</pre>
</div>
</content>
</entry>
</feed>
