aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-08 21:20:44 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-09 11:21:56 +0900
commit6736323194e6cfd417468375669211c03d43d13e (patch)
treebdefc113c777139601723f2ac573db8cac760e75 /eval.c
parent4fb8a12adc993d85af90e8563aff77f100cfdbd5 (diff)
downloadruby-6736323194e6cfd417468375669211c03d43d13e.tar.gz
Suppress a clobbered warning
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index b890c6aa22..bf57d0fb16 100644
--- a/eval.c
+++ b/eval.c
@@ -232,11 +232,9 @@ rb_ec_cleanup(rb_execution_context_t *ec, int ex0)
EC_PUSH_TAG(ec);
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
- th = th0;
SAVE_ROOT_JMPBUF(th, { RUBY_VM_CHECK_INTS(ec); });
step_0: step++;
- th = th0;
errs[1] = ec->errinfo;
if (THROW_DATA_P(ec->errinfo)) ec->errinfo = Qnil;
ruby_init_stack(&errs[STACK_UPPER(errs, 0, 1)]);
@@ -244,7 +242,6 @@ rb_ec_cleanup(rb_execution_context_t *ec, int ex0)
SAVE_ROOT_JMPBUF(th, rb_ec_teardown(ec));
step_1: step++;
- th = th0;
/* protect from Thread#raise */
th->status = THREAD_KILLED;
@@ -252,13 +249,13 @@ rb_ec_cleanup(rb_execution_context_t *ec, int ex0)
SAVE_ROOT_JMPBUF(th, rb_ractor_terminate_all());
}
else {
+ th = th0;
switch (step) {
case 0: goto step_0;
case 1: goto step_1;
}
if (ex == 0) ex = state;
}
- th = th0;
ec->errinfo = errs[1];
sysex = error_handle(ec, ex);
@@ -297,7 +294,9 @@ rb_ec_cleanup(rb_execution_context_t *ec, int ex0)
/* unlock again if finalizer took mutexes. */
rb_threadptr_unlock_all_locking_mutexes(th);
+ th = th0;
EC_POP_TAG();
+ th = th0;
rb_thread_stop_timer_thread();
ruby_vm_destruct(th->vm);
if (state) ruby_default_signal(state);