thread.c: Convert TAG_BREAK to a normal exception at thread top-level

[Bug #18475]
This commit is contained in:
Yusuke Endoh 2022-01-12 17:29:17 +09:00
parent 59eb02cd34
commit ae5458f228
Notes: git 2022-01-13 03:22:14 +09:00
2 changed files with 14 additions and 0 deletions

View file

@ -830,6 +830,9 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start)
else {
errinfo = th->ec->errinfo;
VALUE exc = rb_vm_make_jump_tag_but_local_jump(state, Qundef);
if (!NIL_P(exc)) errinfo = exc;
if (state == TAG_FATAL) {
if (th->invoke_type == thread_invoke_type_ractor_proc) {
rb_ractor_atexit(th->ec, Qnil);