Skip to content

Commit

Permalink
RJIT: Print an error message first
Browse files Browse the repository at this point in the history
Creating a backtrace can crash if RJIT is triggered by branch_stub_hit.
In that case, it's useful to at least print the error message.
  • Loading branch information
k0kubun committed Dec 20, 2023
1 parent fac7d2c commit c28177c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ruby_vm/rjit/compiler.rb
Expand Up @@ -67,7 +67,8 @@ def compile(iseq, cfp)
compile_block(asm, jit:, pc:)
iseq.body.jit_entry = @cb.write(asm)
rescue Exception => e
$stderr.puts e.full_message
$stderr.puts "#{e.class}: #{e.message}"
$stderr.puts e.backtrace
exit 1
end

Expand Down

0 comments on commit c28177c

Please sign in to comment.