From 01fdd48fedd43474fa285629831b001405f565b5 Mon Sep 17 00:00:00 2001 From: normal Date: Fri, 8 Sep 2017 23:51:14 +0000 Subject: fiber: fix machine stack marking when FIBER_USE_NATIVE is 0 * cont.c (cont_mark): mark Fiber machine stack correctly when FIBER_USE_NATIVE is 0 * test/ruby/test_fiber.rb (test_mark_fiber): new test [Bug #13875] [ruby-core:82681] This bug appears to be introduced with r59557. ("refactoring Fiber status") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- cont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cont.c') diff --git a/cont.c b/cont.c index f49ed2bde5..c89f7404f6 100644 --- a/cont.c +++ b/cont.c @@ -248,7 +248,7 @@ cont_mark(void *ptr) const rb_thread_t *th = rb_thread_ptr(cont->saved_thread.self); const rb_fiber_t *fib = (rb_fiber_t*)cont; - if ((th->ec.fiber != fib) && FIBER_SUSPENDED_P(fib)) { + if ((th->ec.fiber != fib) && !FIBER_TERMINATED_P(fib)) { rb_gc_mark_locations(cont->machine.stack, cont->machine.stack + cont->machine.stack_size); } -- cgit v1.2.3