Commit 2e4a8e8
mruby-compiler: fix sp tracking in pattern match failure path
After pattern matching code generation, the sp (stack pointer) must
be restored to match the success path value. The failure path (after
RAISEIF) left sp in a different state, causing incorrect register
allocation in subsequent code like string interpolation.
This caused OP_STRCAT to use the wrong register, leading to
null-dereference when trying to modify a non-string value as a string.
Co-authored-by: Claude <noreply@anthropic.com>1 parent 099d2c4 commit 2e4a8e8
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6667 | 6667 | | |
6668 | 6668 | | |
6669 | 6669 | | |
| 6670 | + | |
| 6671 | + | |
| 6672 | + | |
6670 | 6673 | | |
6671 | 6674 | | |
6672 | 6675 | | |
| |||
0 commit comments