Unverified Commit aaeb73ea authored by A. Wilcox's avatar A. Wilcox 🦊
Browse files

x86: Write link pointer at correct stack offset

It must come *after* the parameters, not *before*.
parent c02cfa82
......@@ -41,7 +41,6 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
argp = sp;
*argp++ = (uintptr_t) &__start_context;
*argp++ = (uintptr_t) ucp->uc_link;
va_start(va, argc);
......@@ -49,6 +48,8 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
*argp++ = va_arg (va, greg_t);
*argp++ = (uintptr_t) ucp->uc_link;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment