[ruby-core:118268] [Ruby master Bug#20569] Instruction sequence generated from `shareable_constant_value: literal` files may not be serialized to binary

Issue #20569 has been reported by byroot (Jean Boussier). ---------------------------------------- Bug #20569: Instruction sequence generated from `shareable_constant_value: literal` files may not be serialized to binary https://bugs.ruby-lang.org/issues/20569 * Author: byroot (Jean Boussier) * Status: Open * Assignee: ko1 (Koichi Sasada) * Backport: 3.1: WONTFIX, 3.2: REQUIRED, 3.3: REQUIRED ---------------------------------------- ```ruby iseq = RubyVM::InstructionSequence.compile(<<~'RUBY') # shareable_constant_value: literal REGEXP = /#{}/ RUBY iseq.to_binary ``` ``` in `to_binary': ibf_dump_object_unsupported: 0x00000001026ac8b0 [3LM ] T_ICLASS (NotImplementedError) ``` The reason is that the ISeq contains `putobject RubyVM::FrozenCore` so `compile.c` need some special handling of that hidden class. Proposed patch: https://github.com/ruby/ruby/pull/10951 -- https://bugs.ruby-lang.org/

Issue #20569 has been updated by byroot (Jean Boussier). I created backport PRs: - 3.2: https://github.com/ruby/ruby/pull/10963 - 3.3: https://github.com/ruby/ruby/pull/10962 ---------------------------------------- Bug #20569: Instruction sequence generated from `shareable_constant_value: literal` files may not be serialized to binary https://bugs.ruby-lang.org/issues/20569#change-108790 * Author: byroot (Jean Boussier) * Status: Closed * Assignee: ko1 (Koichi Sasada) * Backport: 3.1: WONTFIX, 3.2: REQUIRED, 3.3: REQUIRED ---------------------------------------- ```ruby iseq = RubyVM::InstructionSequence.compile(<<~'RUBY') # shareable_constant_value: literal REGEXP = /#{}/ RUBY iseq.to_binary ``` ``` in `to_binary': ibf_dump_object_unsupported: 0x00000001026ac8b0 [3LM ] T_ICLASS (NotImplementedError) ``` The reason is that the ISeq contains `putobject RubyVM::FrozenCore` so `compile.c` need some special handling of that hidden class. Proposed patch: https://github.com/ruby/ruby/pull/10951 -- https://bugs.ruby-lang.org/

Issue #20569 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.1: WONTFIX, 3.2: REQUIRED, 3.3: REQUIRED to 3.1: WONTFIX, 3.2: REQUIRED, 3.3: DONE ruby_3_3 commit:8951040aadca57fce633b0f714248de78a962c22. ---------------------------------------- Bug #20569: Instruction sequence generated from `shareable_constant_value: literal` files may not be serialized to binary https://bugs.ruby-lang.org/issues/20569#change-108800 * Author: byroot (Jean Boussier) * Status: Closed * Assignee: ko1 (Koichi Sasada) * Backport: 3.1: WONTFIX, 3.2: REQUIRED, 3.3: DONE ---------------------------------------- ```ruby iseq = RubyVM::InstructionSequence.compile(<<~'RUBY') # shareable_constant_value: literal REGEXP = /#{}/ RUBY iseq.to_binary ``` ``` in `to_binary': ibf_dump_object_unsupported: 0x00000001026ac8b0 [3LM ] T_ICLASS (NotImplementedError) ``` The reason is that the ISeq contains `putobject RubyVM::FrozenCore` so `compile.c` need some special handling of that hidden class. Proposed patch: https://github.com/ruby/ruby/pull/10951 -- https://bugs.ruby-lang.org/

Issue #20569 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.1: WONTFIX, 3.2: REQUIRED, 3.3: DONE to 3.1: WONTFIX, 3.2: DONE, 3.3: DONE ruby_3_2 commit:e0e1a0f502fe57e7e7e8cf643b8f141b4582d62d. ---------------------------------------- Bug #20569: Instruction sequence generated from `shareable_constant_value: literal` files may not be serialized to binary https://bugs.ruby-lang.org/issues/20569#change-108830 * Author: byroot (Jean Boussier) * Status: Closed * Assignee: ko1 (Koichi Sasada) * Backport: 3.1: WONTFIX, 3.2: DONE, 3.3: DONE ---------------------------------------- ```ruby iseq = RubyVM::InstructionSequence.compile(<<~'RUBY') # shareable_constant_value: literal REGEXP = /#{}/ RUBY iseq.to_binary ``` ``` in `to_binary': ibf_dump_object_unsupported: 0x00000001026ac8b0 [3LM ] T_ICLASS (NotImplementedError) ``` The reason is that the ISeq contains `putobject RubyVM::FrozenCore` so `compile.c` need some special handling of that hidden class. Proposed patch: https://github.com/ruby/ruby/pull/10951 -- https://bugs.ruby-lang.org/
participants (3)
-
byroot (Jean Boussier)
-
k0kubun (Takashi Kokubun)
-
nagachika (Tomoyuki Chikanaga)