diff options
author | 卜部昌平 <[email protected]> | 2020-07-14 13:15:06 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2020-07-14 13:15:06 +0900 |
commit | 8d3a08457292d027070920e4fb3244445a142a3d (patch) | |
tree | baa3375caaa6a5fa23f11d8b04ae5fe29a4540a4 /tool/ruby_vm | |
parent | 8900a25581822759daca528d46a75e0b743fc22e (diff) |
_mjit_compile_invokebuiltin: sp_inc can be negative
Was my bad to assume sp_inc was positive. Real criteria is the
calculated sp is non-negative. We have to assert that.
Diffstat (limited to 'tool/ruby_vm')
-rw-r--r-- | tool/ruby_vm/views/_mjit_compile_invokebuiltin.erb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_invokebuiltin.erb b/tool/ruby_vm/views/_mjit_compile_invokebuiltin.erb index 29a21b17de..9a9e53af40 100644 --- a/tool/ruby_vm/views/_mjit_compile_invokebuiltin.erb +++ b/tool/ruby_vm/views/_mjit_compile_invokebuiltin.erb @@ -11,7 +11,7 @@ % end rb_snum_t sp_inc = <%= insn.call_attribute('sp_inc') %>; unsigned sp = b->stack_size + (unsigned)sp_inc; - VM_ASSERT(sp_inc >= 0); + VM_ASSERT(b->stack_size > -sp_inc); VM_ASSERT(sp_inc < UINT_MAX - b->stack_size); if (bf->compiler) { |