-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
kind:bugA bug in the code. Does not apply to documentation, specs, etc.A bug in the code. Does not apply to documentation, specs, etc.topic:compiler:interpreter
Description
I identified the interpreter segfault from #16128 and #16209 and the following example reproduces: the interpreter segfaults when the scheduler tries to resume the fiber:
class Foo
property fiber : Fiber?
def enqueue
@fiber.not_nil!("oops").enqueue
# ^-- the scheduler segfaults when resuming the fiber
end
end
foo = Foo.new
foo.fiber = Fiber.new { p "hello world" }
foo.enqueue
Fiber.yieldFor the record, using a local variable works around the issue:
def enqueue
if fiber = @fiber
fiber.enqueue
# ^-- this is fine
else
raise NilAssertionError.new("oops")
end
endMetadata
Metadata
Assignees
Labels
kind:bugA bug in the code. Does not apply to documentation, specs, etc.A bug in the code. Does not apply to documentation, specs, etc.topic:compiler:interpreter