* [Bug #22562] Type confusion SEGV: Using `super` and `instance_exec` it is possible to run Array#first on an instance of Integer (alanwu) * Matz attention needed to decide new rules for switching self then using `super`. Two options a...alanwu (Alan Wu)
@matz To fix this bug, we'll need to amend how `self` is type-checked when `super` happens after switching `self` (through e.g. `instance_exec`, `eval`). I have found two options, please decide which one you would prefer so we can have a...alanwu (Alan Wu)
```ruby class C0; end; class C1 < C0; end module M1; end c0 = C0.new c1 = C1.new.extend(M1) module R1; refine(M1) { def m = super }; end C0.prepend M1 p c1.singleton_class.ancestors # [#<singleton>, M1, C1, M1, C0, ...] using R...alanwu (Alan Wu)
```ruby # a.rb module M; end class A < Array; include M; end using(Module.new { refine(M) { def first = super } }) p A.instance_method(:first).bind_call(0x6f56) # [BUG] Segmentation fault at 0x000000000000dead __END__ Correct N...alanwu (Alan Wu)
Good idea to save memory. Though, freeing at a certain program point by taking a ractor barrier is incorrect. That does not prevent you from freeing code that some other ractor is still running. Like trying to free JIT code, only the GC...alanwu (Alan Wu)
The following crashes 3.3.0 through current trunk (commit:caf4f279d1): ```ruby module M # fixnum: (0x6f56<<1)+1 = 0xdead def first = 0x6f56.instance_exec { super } end M.instance_method(:first).bind_call([]) # <internal:array>...alanwu (Alan Wu)
We make a lot of empty BitSets for FrameState::spilled_locals and previously allocated memory for the clear bits unnecessarily. There is now one representation for the all-clear BitSet of any size.alanwu (Alan Wu)