ruby-changes:39483
From: nobu <ko1@a...>
Date: Thu, 13 Aug 2015 16:22:47 +0900 (JST)
Subject: [ruby-changes:39483] nobu:r51564 (trunk): thread.c: freeze masks
nobu 2015-08-13 16:22:10 +0900 (Thu, 13 Aug 2015) New Revision: 51564 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51564 Log: thread.c: freeze masks * thread.c (rb_thread_s_handle_interrupt, rb_uninterruptible): freeze mask hashes. Modified files: trunk/thread.c Index: thread.c =================================================================== --- thread.c (revision 51563) +++ thread.c (revision 51564) @@ -1835,6 +1835,7 @@ rb_thread_s_handle_interrupt(VALUE self, https://github.com/ruby/ruby/blob/trunk/thread.c#L1835 if (!mask) { return rb_yield(Qnil); } + OBJ_FREEZE_RAW(mask); rb_ary_push(th->pending_interrupt_mask_stack, mask); if (!rb_threadptr_pending_interrupt_empty_p(th)) { th->pending_interrupt_queue_checked = 0; @@ -5288,6 +5289,7 @@ rb_uninterruptible(VALUE (*b_proc)(ANYAR https://github.com/ruby/ruby/blob/trunk/thread.c#L5289 rb_thread_t *cur_th = GET_THREAD(); rb_hash_aset(interrupt_mask, rb_cObject, sym_never); + OBJ_FREEZE_RAW(interrupt_mask); rb_ary_push(cur_th->pending_interrupt_mask_stack, interrupt_mask); return rb_ensure(b_proc, data, rb_ary_pop, cur_th->pending_interrupt_mask_stack); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/