• David du Colombier's avatar
    runtime: fix "invalid address in sys call" on Plan 9 · 56872f02
    David du Colombier authored
    Rfork is not splitting the stack when creating a new thread,
    so the parent and child are executing on the same stack.
    However, if the parent returns and keeps executing before
    the child can read the arguments from the parent stack,
    the child will not see the right arguments. The solution
    is to load the needed pieces from the parent stack into
    register before INT $64.
    
    Thanks to Russ Cox for the explanation.
    
    LGTM=rsc
    R=rsc
    CC=ality, golang-codereviews
    https://golang.org/cl/64140043
    56872f02
sys_plan9_386.s 3.31 KB