ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:100165] [Ruby master Bug#17192] ISeq.load_from_binary can cause BUG if binary is a rbinc-derived
@ 2020-09-26  7:18 s.wanabe
  2020-10-02 15:57 ` [ruby-core:100281] " nobu
  2021-02-11  5:08 ` [ruby-core:102455] " nagachika00
  0 siblings, 2 replies; 3+ messages in thread
From: s.wanabe @ 2020-09-26  7:18 UTC (permalink / raw)
  To: ruby-core

Issue #17192 has been reported by wanabe (_ wanabe).

----------------------------------------
Bug #17192: ISeq.load_from_binary can cause BUG if binary is a rbinc-derived
https://bugs.ruby-lang.org/issues/17192

* Author: wanabe (_ wanabe)
* Status: Open
* Priority: Normal
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
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.



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:100281] [Ruby master Bug#17192] ISeq.load_from_binary can cause BUG if binary is a rbinc-derived
  2020-09-26  7:18 [ruby-core:100165] [Ruby master Bug#17192] ISeq.load_from_binary can cause BUG if binary is a rbinc-derived s.wanabe
@ 2020-10-02 15:57 ` nobu
  2021-02-11  5:08 ` [ruby-core:102455] " nagachika00
  1 sibling, 0 replies; 3+ messages in thread
From: nobu @ 2020-10-02 15:57 UTC (permalink / raw)
  To: ruby-core

Issue #17192 has been updated by nobu (Nobuyoshi Nakada).

Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED

https://github.com/ruby/ruby/pull/3622

----------------------------------------
Bug #17192: ISeq.load_from_binary can cause BUG if binary is a rbinc-derived
https://bugs.ruby-lang.org/issues/17192#change-87867

* Author: wanabe (_ wanabe)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.0.0dev (2020-09-25T22:52:04Z master 137fa5b27e) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED
----------------------------------------
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.



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:102455] [Ruby master Bug#17192] ISeq.load_from_binary can cause BUG if binary is a rbinc-derived
  2020-09-26  7:18 [ruby-core:100165] [Ruby master Bug#17192] ISeq.load_from_binary can cause BUG if binary is a rbinc-derived s.wanabe
  2020-10-02 15:57 ` [ruby-core:100281] " nobu
@ 2021-02-11  5:08 ` nagachika00
  1 sibling, 0 replies; 3+ messages in thread
From: nagachika00 @ 2021-02-11  5:08 UTC (permalink / raw)
  To: ruby-core

Issue #17192 has been updated by nagachika (Tomoyuki Chikanaga).

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.

----------------------------------------
Bug #17192: ISeq.load_from_binary can cause BUG if binary is a rbinc-derived
https://bugs.ruby-lang.org/issues/17192#change-90342

* Author: wanabe (_ wanabe)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 3.0.0dev (2020-09-25T22:52:04Z master 137fa5b27e) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE
----------------------------------------
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.



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-11  5:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-26  7:18 [ruby-core:100165] [Ruby master Bug#17192] ISeq.load_from_binary can cause BUG if binary is a rbinc-derived s.wanabe
2020-10-02 15:57 ` [ruby-core:100281] " nobu
2021-02-11  5:08 ` [ruby-core:102455] " nagachika00

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).