From a98e343d39c4d7bf1e2190b076720f32d9f298b3 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 17 Dec 2013 07:19:25 +0000 Subject: vm_trace.c: isolate exceptions * vm_trace.c (rb_postponed_job_flush): isolate exceptions in postponed jobs and restore outer ones. based on a patch by tarui. [ruby-core:58652] [Bug #9168] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_trace.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vm_trace.c') diff --git a/vm_trace.c b/vm_trace.c index 49a5fd0832..81452997e9 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -1511,7 +1511,9 @@ rb_postponed_job_flush(rb_vm_t *vm) { rb_thread_t *th = GET_THREAD(); unsigned long saved_postponed_job_interrupt_mask = th->interrupt_mask & POSTPONED_JOB_INTERRUPT_MASK; + VALUE saved_errno = th->errinfo; + th->errinfo = Qnil; /* mask POSTPONED_JOB dispatch */ th->interrupt_mask |= POSTPONED_JOB_INTERRUPT_MASK; { @@ -1530,4 +1532,5 @@ rb_postponed_job_flush(rb_vm_t *vm) } /* restore POSTPONED_JOB mask */ th->interrupt_mask &= ~(saved_postponed_job_interrupt_mask ^ POSTPONED_JOB_INTERRUPT_MASK); + th->errinfo = saved_errno; } -- cgit v1.2.3