summaryrefslogtreecommitdiff
path: root/vm_trace.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-17 07:19:25 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-17 07:19:25 (GMT)
commita98e343d39c4d7bf1e2190b076720f32d9f298b3 (patch)
tree9501038d21dcc93d495c3c413695ecab7b4d5935 /vm_trace.c
parent8859ff1d09d7d3787beacf2568d18d4208cdc356 (diff)
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
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm_trace.c b/vm_trace.c
index 49a5fd0..8145299 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;
}