Commit ed9b577
committed
YJIT: Fix crash when Kernel is prepended before JIT init
Use RCLASS_ORIGIN when looking up methods to register for specialized
codegen. Module#prepend moves original methods to an origin iclass,
so rb_method_entry_at on the module itself returns NULL after prepend.
This happens in practice when BUNDLER_SETUP triggers Kernel.prepend
during ruby_init_prelude, before rb_yjit_init runs.1 parent 997bc70 commit ed9b577
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10910 | 10910 | | |
10911 | 10911 | | |
10912 | 10912 | | |
10913 | | - | |
| 10913 | + | |
| 10914 | + | |
10914 | 10915 | | |
10915 | 10916 | | |
10916 | 10917 | | |
| |||
0 commit comments