Objects of type ucontext_t cannot be copied, only getcontext can properly initialize them. For example, on powerpc the structure contains a pointer into itself, so makecontext modifies the original object by side effect.