Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YJIT: Fix shrinking block with assumption too much (#10585)
* YJIT: Fix shrinking block with assumption too much Under the very specific circumstances, discovered by a test case in `ruby/spec`, an `expandarray` block can contain just a branch and carry a method lookup assumption. Previously, when we regenerated the branch, we allowed it to shrink to empty, since we put the code at the jump target immediately after it. That was incorrect and caused a crash while the block is invalidated, since that left no room to patch in an exit. When regenerating a branch that makes up a block entirely, and the block could be invalidated, we need to ensure there is room for invalidation. When there is code before the branch, they should act as padding, so we don't need to worry about those cases. * skip on RJIT
- Loading branch information