Project

General

Profile

Bug #14689

bootsnap gets object index out of range: 266287972352 (IndexError) since r63113

Added by yahonda (Yasuo Honda) 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-04-16 trunk 63163) [x86_64-linux]
[ruby-core:86548]

Description

Steps to reproduce

$ 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)

Associated revisions

Revision 58a20844
Added by nobu (Nobuyoshi Nakada) 8 months ago

compile.c: align range

  • compile.c (ibf_dump_object_struct): align range elements. [Bug #14689]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 63167
Added by nobu (Nobuyoshi Nakada) 8 months ago

compile.c: align range

  • compile.c (ibf_dump_object_struct): align range elements. [Bug #14689]

History

#1 Updated by nobu (Nobuyoshi Nakada) 8 months ago

  • Status changed from Open to Closed

Applied in changeset trunk|r63167.


compile.c: align range

  • compile.c (ibf_dump_object_struct): align range elements. [Bug #14689]

#2 [ruby-core:86579] Updated by yahonda (Yasuo Honda) 8 months ago

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

Also available in: Atom PDF