Actions
Bug #17192
closedISeq.load_from_binary can cause BUG if binary is a rbinc-derived
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.0dev (2020-09-25T22:52:04Z master 137fa5b27e) [x86_64-linux]
Description
The following command can cause BUG.
$ ruby -e 'print RubyVM::InstructionSequence.of(1.method(:abs)).to_binary'|ruby -e 'RubyVM::InstructionSequence.load_from_binary(ARGF.read)'
-e:1: [BUG] ibf_load_builtin: table is not provided.
ruby 3.0.0dev (2020-09-25T22:52:04Z master 137fa5b27e) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0003 p:---- s:0011 e:000010 CFUNC :load_from_binary
c:0002 p:0026 s:0006 e:000005 EVAL -e:1 [FINISH]
c:0001 p:0000 s:0003 E:001910 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
-e:1:in `<main>'
-e:1:in `load_from_binary'
-- C level backtrace information -------------------------------------------
[0x5635c8378d2e]
/home/wanabe/.rbenv/versions/master/bin/ruby(rb_bug+0xe9) [0x5635c817641c] ../../error.c:686
[0x5635c817b772]
/home/wanabe/.rbenv/versions/master/bin/ruby(ibf_load_iseq+0xf3) [0x5635c83de093] ../../compile.c:11898
[0x5635c83de18e]
(snip)
I think that ISeq.of
should raise some kind of exception on the case.
Or ISeq.load_from_binary
may raise an exception.
Updated by wanabe (_ wanabe) over 4 years ago
- ruby -v set to ruby 3.0.0dev (2020-09-25T22:52:04Z master 137fa5b27e) [x86_64-linux]
Updated by nobu (Nobuyoshi Nakada) about 4 years ago
- Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED
Updated by nobu (Nobuyoshi Nakada) about 4 years ago
- Status changed from Open to Closed
Applied in changeset git|555bd83a8e8b1e859f698089cbbd9ad938159a0e.
Raise when loading unprovided builtin function [Bug #17192]
Updated by nagachika (Tomoyuki Chikanaga) almost 4 years ago
- Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE
ruby_2_7 f49355a720afe492ea49809e469dce36a9ea961a merged revision(s) 555bd83a8e8b1e859f698089cbbd9ad938159a0e.
Actions
Like0
Like0Like0Like0Like0