aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-28 05:36:48 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-28 05:36:48 +0000
commit3a8a8824dbc1ead40d56a900e03deef4a5a50b63 (patch)
tree2a37d4fb1ad5e79b3a0a4c15d619f41e13126739 /vm.c
parentb22050f1686f598df1c22909807689c48958d904 (diff)
downloadruby-3a8a8824dbc1ead40d56a900e03deef4a5a50b63.tar.gz
skip machine stack marking for current ec.
* vm.c (rb_execution_context_mark): At the beggining of GC marking, mark_current_machine_context() marks running machine stack so that rb_execution_context_mark() should not mark machine stack if it is current ec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 4b4b440025..40041302b5 100644
--- a/vm.c
+++ b/vm.c
@@ -2398,7 +2398,9 @@ rb_execution_context_mark(const rb_execution_context_t *ec)
}
/* mark machine stack */
- if (ec->machine.stack_start && ec->machine.stack_end) {
+ if (ec->machine.stack_start && ec->machine.stack_end &&
+ ec != GET_EC() /* marked for current ec at the first stage of marking */
+ ) {
rb_gc_mark_machine_stack(ec);
rb_gc_mark_locations((VALUE *)&ec->machine.regs,
(VALUE *)(&ec->machine.regs) +