Skip to content
Snippets Groups Projects
Commit 7c9e1a9d authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

gh-833: fiber.info() doesn't work

Push a workaround for infinite loop in backtarce_foreach() when
fiber == self: do not try to print trace of the current fiber.
parent bfcfa3bc
No related branches found
No related tags found
No related merge requests found
......@@ -242,9 +242,11 @@ lbox_fiber_statof(struct fiber *f, void *cb_ctx)
#ifdef ENABLE_BACKTRACE
lua_pushstring(L, "backtrace");
lua_newtable(L);
backtrace_foreach(fiber_backtrace_cb,
f->last_stack_frame,
f->coro.stack, f->coro.stack_size, L);
if (f != fiber()) {
backtrace_foreach(fiber_backtrace_cb,
f->last_stack_frame,
f->coro.stack, f->coro.stack_size, L);
}
lua_settable(L, -3);
#endif /* ENABLE_BACKTRACE */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment