Issue #14689 has been updated by yahonda (Yasuo Honda).


I have also validated the fix using "ruby 2.6.0dev (2018-04-18 trunk 63186) [x86_64-linux]"
Thank you.

----------------------------------------
Bug #14689: bootsnap gets object index out of range: 266287972352 (IndexError) since r63113
https://bugs.ruby-lang.org/issues/14689#change-71521

* Author: yahonda (Yasuo Honda)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0dev (2018-04-16 trunk 63163) [x86_64-linux]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
# Steps to reproduce
~~~ text
$ rbenv install 2.6.0-dev
$ rbenv global 2.6.0-dev
$ git clone https://github.com/Shopify/bootsnap
$ cd bootsnap
$ bundle
$ rake
$ bundle exec bin/testunit
~~~

# Expected result as of r63112
~~~
$ ruby -v
ruby 2.6.0dev (2018-04-07 trunk 63112) [x86_64-linux]
$ bundle exec bin/testunit
... snip ....
# Running:

.....................................................................................................................

Finished in 0.098554s, 1187.1708 runs/s, 2059.7920 assertions/s.

117 runs, 203 assertions, 0 failures, 0 errors, 0 skips
$
~~~

# Actual result since r63113
~~~
$ ruby -v
ruby 2.6.0dev (2018-04-07 trunk 63113) [x86_64-linux]
$ bundle exec bin/testunit
... snip ...
Traceback (most recent call last):
	9: from /home/yahonda/.rbenv/versions/2.6.0-dev_yahonda/lib/ruby/gems/2.6.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'
	8: from /home/yahonda/.rbenv/versions/2.6.0-dev_yahonda/lib/ruby/gems/2.6.0/gems/minitest-5.11.3/lib/minitest.rb:121:in `run'
	7: from /home/yahonda/.rbenv/versions/2.6.0-dev_yahonda/lib/ruby/gems/2.6.0/gems/minitest-5.11.3/lib/minitest.rb:92:in `load_plugins'
	6: from /home/yahonda/.rbenv/versions/2.6.0-dev_yahonda/lib/ruby/gems/2.6.0/gems/minitest-5.11.3/lib/minitest.rb:92:in `each'
	5: from /home/yahonda/.rbenv/versions/2.6.0-dev_yahonda/lib/ruby/gems/2.6.0/gems/minitest-5.11.3/lib/minitest.rb:98:in `block in load_plugins'
	4: from /home/yahonda/.rbenv/versions/2.6.0-dev_yahonda/lib/ruby/gems/2.6.0/gems/minitest-5.11.3/lib/minitest.rb:98:in `require'
	3: from /home/yahonda/git/bootsnap/lib/bootsnap/compile_cache/iseq.rb:37:in `load_iseq'
	2: from /home/yahonda/git/bootsnap/lib/bootsnap/compile_cache/iseq.rb:37:in `fetch'
	1: from /home/yahonda/git/bootsnap/lib/bootsnap/compile_cache/iseq.rb:18:in `storage_to_output'
/home/yahonda/git/bootsnap/lib/bootsnap/compile_cache/iseq.rb:18:in `load_from_binary': object index out of range: 266287972352 (IndexError)
$
~~~

### iseq.rb:18 executes RubyVM::InstructionSequence.load_from_binary
https://github.com/Shopify/bootsnap/blob/30ac9d332d758d8641e5775541e7b0b2f13bff58/lib/bootsnap/compile_cache/iseq.rb#L18
~~~
        RubyVM::InstructionSequence.load_from_binary(binary)
~~~



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>