summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-02-10 15:23:57 -0800
committerTakashi Kokubun <[email protected]>2023-03-05 22:41:35 -0800
commitb379ccf755b8f30d3b029f124e2870dcd4a87dab (patch)
treede7b5ebaff74b5bb0a7762a9b4dadf9827003828 /lib
parent1fa519fdae39928fefa7845db9fa17aa8bafe21e (diff)
Handle RangeError in iseq_lineno
Diffstat (limited to 'lib')
-rw-r--r--lib/ruby_vm/mjit/exit_compiler.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ruby_vm/mjit/exit_compiler.rb b/lib/ruby_vm/mjit/exit_compiler.rb
index 531fe3f426..6d3a0406a7 100644
--- a/lib/ruby_vm/mjit/exit_compiler.rb
+++ b/lib/ruby_vm/mjit/exit_compiler.rb
@@ -139,6 +139,8 @@ module RubyVM::MJIT
def iseq_lineno(iseq, pc)
C.rb_iseq_line_no(iseq, (pc - iseq.body.iseq_encoded.to_i) / C.VALUE.size)
+ rescue RangeError # bignum too big to convert into `unsigned long long' (RangeError)
+ -1
end
end
end