Handle RangeError in iseq_lineno

This commit is contained in:
Takashi Kokubun 2023-02-10 15:23:57 -08:00
parent 1fa519fdae
commit b379ccf755

View File

@ -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