This changeset reduces the generated binary of
vm_call_method_missing_body from 604 bytes to 532 bytes on my machine.
Should reduce GC pressure as well.
CIs are created on-the-fly, which increases GC pressure. However they
include no references to other objects, and those on-the-fly CIs tend to
be short lived. Why not skip allocation of them. In doing so we need
to add a flag denotes the CI object does not reside inside of objspace.
These crashes are due to alignment issues, casting ADJUST to INSN
and then accessing after the end of the ADJUST. These patches
come from Stefan Sperling <stsp@apache.org>, who reported the
issue.
This leads to double requiring "ext/psych/lib/psych/versions.rb" and
".ext/common/psych/versions.rb", which produces doxens of warnings
during `make test-all`.
http://rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200608T123004Z.log.html.gz
```
[15092/20234]
TestRDocOptions#test_init_with_encoding/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/ext/psych/lib/psych.rb:233: warning: already initialized constant Psych::LIBYAML_VERSION
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/.ext/common/psych.rb:233: warning: previous definition of LIBYAML_VERSION was here
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/ext/psych/lib/psych.rb:235: warning: already initialized constant Psych::NOT_GIVEN
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/.ext/common/psych.rb:235: warning: previous definition of NOT_GIVEN was here
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/ext/psych/lib/psych.rb:271: warning: method redefined; discarding old load
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/.ext/common/psych.rb:271: warning: previous definition of load was here
...
```
The same issue happened in fiddle.gemspec, and this change applies the
same fix as [fiddle](https://github.com/ruby/fiddle/issues/34).
The idFWD_KWREST sections may be wrong. However, the existing
idFWD_KWREST sections for ... without leading arguments are already
broken.
Implements [Feature #16378]
* Do not chdir in the runner process, to access miniruby. Chdir
in worker processes instead.
* GNU make does not export newly added environment variables by
default, set PARALLEL_TESTS_EXECUTABLE in the runner.
Removing it triggers the following warnings when running `bundle` under
jruby from the root of the `psych` repo prints the following warnings:
```
/path/to/jruby-9.2.9.0/lib/ruby/gems/shared/gems/psych-3.1.0-java/lib/psych/versions.rb:7: warning: already initialized constant VERSION
/path/to//jruby-9.2.9.0/lib/ruby/gems/shared/gems/psych-3.1.0-java/lib/psych/versions.rb:10: warning: already initialized constant DEFAULT_SNAKEYAML_VERSION
```
This is because bundler loads the versions file relatively from the
local gemspec, and then internally loads the psych gem, causing the
redefinition warnings.
Instead, we modify the $LOAD_PATH so that when working locally on the
`psych` repo, the local version of `psych` gets used.
https://github.com/ruby/psych/commit/a3fc8191a7
Current version is not installable because the gemspec is invalid, since
it includes a `.travis.yml` file that no longer exists, so `rake
install` fails like this:
```
$ rake install
rake aborted!
WARNING: See https://guides.rubygems.org/specification-reference/ for help
ERROR: While executing gem ... (Gem::InvalidSpecificationException)
[".travis.yml"] are not files
```
https://github.com/ruby/psych/commit/32b18ca7ca
https://rubyci.org/logs/rubyci.s3.amazonaws.com/wsl2/ruby-master/log/20200605T020004Z.fail.html.gz
```
[ 984/20282] IMAPTest#test_connection_closed_without_greeting#<Thread:0x000055b6e9589d28 /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:133 run> terminated with exception (report_on_exception is true):
/home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/.ext/common/socket.rb:252:in `local_address': closed stream (IOError)
from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/.ext/common/socket.rb:252:in `connect_address'
from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `block (2 levels) in test_connection_closed_without_greeting'
from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `each_object'
from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `each'
from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `map'
from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `block in test_connection_closed_without_greeting'
from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:134:in `block in start_server'
```
debug print does not include `in_tcp_socket_2`,
so I think other socket connected to server socket.
Add sockets to debug print, and check other socket is in same process or not.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20200604T160009Z.fail.html.gz
```
1) Failure:
IMAPTest#test_connection_closed_without_greeting [/export/home/chkbuild/chkbuild-gcc/tmp/build/20200604T160009Z/ruby/test/net/imap/test_imap.rb:523]:
[Net::IMAP::Error] exception expected, not #<RuntimeError: {:server=>#<TCPServer:(closed)>,
:port=>35490,
:server_created=>
{:server=>"#<TCPServer:fd 10, AF_INET6, ::1, 35490>", :t=>45917010.30510591},
:in_start_server_before_accept=>{:t=>45917010.305154555},
:in_tcp_socket=>
{:host=>"::1",
:port=>35490,
:server=>"#<TCPServer:fd 10, AF_INET6, ::1, 35490>",
:t=>45917010.40560127},
:in_start_server=>
{:sock_addr=>["AF_INET6", 35490, "::1", "::1"],
:sock_peeraddr=>["AF_INET6", 51584, "::1", "::1"],
:t=>45917010.40767231},
:in_start_server_sock_closed=>{:t=>45917010.40770047},
:in_rescue=>
{:e=>#<Errno::EINVAL: Invalid argument - connect(2) for [::1]:35490>,
:server_addr=>"::1",
:t=>45917010.40867455}}
>.
```