mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Check if the exception is frozen; fix #4025
`exc_debug_info()` and `mrb_keep_backtrace()` raise `FrozenError` if the exception is frozen and lead to infinite loop.
This commit is contained in:
+1
-1
@@ -233,7 +233,7 @@ mrb_exc_set(mrb_state *mrb, mrb_value exc)
|
||||
(struct RBasic*)mrb->exc == mrb->gc.arena[mrb->gc.arena_idx-1]) {
|
||||
mrb->gc.arena_idx--;
|
||||
}
|
||||
if (!mrb->gc.out_of_memory) {
|
||||
if (!mrb->gc.out_of_memory && !MRB_FROZEN_P(mrb->exc)) {
|
||||
exc_debug_info(mrb, mrb->exc);
|
||||
mrb_keep_backtrace(mrb, exc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user