<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/builtin.c, 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>Free everything at shutdown</title>
<updated>2023-12-07T20:52:35+00:00</updated>
<author>
<name>Adam Hess</name>
<email>adamhess1991@gmail.com</email>
</author>
<published>2023-10-12T18:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6816e8efcff3be75f8020cd1b0ea57d3cd664bbc'/>
<id>6816e8efcff3be75f8020cd1b0ea57d3cd664bbc</id>
<content type='text'>
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown.

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
Co-authored-by: Peter Zhu &lt;peter@peterzhu.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown.

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
Co-authored-by: Peter Zhu &lt;peter@peterzhu.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #18286] Make builtin binary if sharable in universal binaries</title>
<updated>2023-11-09T07:01:01+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-10-19T11:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=22939382a897af32d9899fafedd5be807b0d555b'/>
<id>22939382a897af32d9899fafedd5be807b0d555b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Disable iseq-dumped builtin module for universal x86_64/arm64 binaries"</title>
<updated>2023-11-09T07:01:01+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-11-09T04:40:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=40d40a651ef8d9cd150503fc264b1c922f63fe61'/>
<id>40d40a651ef8d9cd150503fc264b1c922f63fe61</id>
<content type='text'>
This reverts commit 1d5598fe0d3470e7cab06a756d40a9221fcd501b.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 1d5598fe0d3470e7cab06a756d40a9221fcd501b.
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable iseq-dumped builtin module for universal x86_64/arm64 binaries</title>
<updated>2023-11-09T03:24:01+00:00</updated>
<author>
<name>Ben Hamilton</name>
<email>benhamilton@google.com</email>
</author>
<published>2023-02-23T20:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1d5598fe0d3470e7cab06a756d40a9221fcd501b'/>
<id>1d5598fe0d3470e7cab06a756d40a9221fcd501b</id>
<content type='text'>
During the build, Ruby has special logic to serialize its own builtin
module to disk using the binary iseq format during the build (I assume
for speed so it doesn't have to parse builtin every time it starts
up).

However, since iseq format is architecture-specific, when building on
x86_64 for universal x86_64 + arm64, the serialized builtin module is
written with the x86_64 architecture of the build machine, which fails
this check whenever ruby imports the builtin module on arm64:

https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/compile.c#L13243

Thankfully, there's logic to disable this feature for cross-compiled builds:

https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/builtin.c#L6

This disables the iseq logic for universal builds as well.

Fixes [Bug #18286]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During the build, Ruby has special logic to serialize its own builtin
module to disk using the binary iseq format during the build (I assume
for speed so it doesn't have to parse builtin every time it starts
up).

However, since iseq format is architecture-specific, when building on
x86_64 for universal x86_64 + arm64, the serialized builtin module is
written with the x86_64 architecture of the build machine, which fails
this check whenever ruby imports the builtin module on arm64:

https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/compile.c#L13243

Thankfully, there's logic to disable this feature for cross-compiled builds:

https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/builtin.c#L6

This disables the iseq logic for universal builds as well.

Fixes [Bug #18286]
</pre>
</div>
</content>
</entry>
<entry>
<title>`rb_bug` prints a newline after the message</title>
<updated>2023-05-20T12:43:30+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-05-20T05:00:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8d242a33af19672977dcdcb8d32e9ad547bc0141'/>
<id>8d242a33af19672977dcdcb8d32e9ad547bc0141</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Check loading built-in binaries</title>
<updated>2023-03-08T04:59:21+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-03-08T03:16:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=677c3228d09eaeaa57ad18396f52841f31411b6a'/>
<id>677c3228d09eaeaa57ad18396f52841f31411b6a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix trivial -Wundef warnings</title>
<updated>2021-05-04T12:56:55+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2021-04-29T12:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=68d6bd0873557c12bec6f8e0f8db622f1499d8a7'/>
<id>68d6bd0873557c12bec6f8e0f8db622f1499d8a7</id>
<content type='text'>
* See [Feature #17752]

Co-authored-by: xtkoba (Tee KOBAYASHI) &lt;xtkoba+ruby@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* See [Feature #17752]

Co-authored-by: xtkoba (Tee KOBAYASHI) &lt;xtkoba+ruby@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>builtin_lookup: do not goto into a branch</title>
<updated>2020-06-29T02:05:41+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2020-06-11T04:23:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8d182b04ed04378877e743535658be41a05aef74'/>
<id>8d182b04ed04378877e743535658be41a05aef74</id>
<content type='text'>
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea.  Better refactor.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea.  Better refactor.
</pre>
</div>
</content>
</entry>
<entry>
<title>take care of USE_LAZY_LOAD=1.</title>
<updated>2019-12-25T05:12:33+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2019-12-25T05:10:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d9bf9c572f461c282fa6e65833e98bc7d453a66f'/>
<id>d9bf9c572f461c282fa6e65833e98bc7d453a66f</id>
<content type='text'>
On USE_LAZY_LOAD=1, the iseq should be loaded. So rb_iseq_check()
is needed. Furthermore, now lazy loading with builtin_function_table
is not supported, so it should cancel lazy loading.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On USE_LAZY_LOAD=1, the iseq should be loaded. So rb_iseq_check()
is needed. Furthermore, now lazy loading with builtin_function_table
is not supported, so it should cancel lazy loading.
</pre>
</div>
</content>
</entry>
<entry>
<title>rely on sorted compiled binary array.</title>
<updated>2019-12-11T06:48:30+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2019-12-11T06:45:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7f5014e6e884d7fa091e3e6462827b910417267c'/>
<id>7f5014e6e884d7fa091e3e6462827b910417267c</id>
<content type='text'>
`builtin_binary` is sorted by miniruby loading order and this
loading order should be same on ruby. So we can believe sorted
order of `builtin_binary` on boot time.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`builtin_binary` is sorted by miniruby loading order and this
loading order should be same on ruby. So we can believe sorted
order of `builtin_binary` on boot time.
</pre>
</div>
</content>
</entry>
</feed>
