diff options
author | Takashi Kokubun <[email protected]> | 2023-12-20 09:17:19 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-12-20 09:17:46 -0800 |
commit | c28177cd57c99865bbf18e73008ba6fb11f73a2e (patch) | |
tree | 4518ae9613e6290b1923f8fd091d85c42f5701e3 /lib/ruby_vm/rjit/compiler.rb | |
parent | fac7d2c1ab97cfdbb173360879c1fe07f443624b (diff) |
RJIT: Print an error message first
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.
Diffstat (limited to 'lib/ruby_vm/rjit/compiler.rb')
-rw-r--r-- | lib/ruby_vm/rjit/compiler.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ruby_vm/rjit/compiler.rb b/lib/ruby_vm/rjit/compiler.rb index 2c4e1d67cf..964814460b 100644 --- a/lib/ruby_vm/rjit/compiler.rb +++ b/lib/ruby_vm/rjit/compiler.rb @@ -67,7 +67,8 @@ module RubyVM::RJIT 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 |