• Russ Cox's avatar
    runtime: fix panic/wrapper/recover math · 84736957
    Russ Cox authored
    The gp->panicwrap adjustment is just fatally flawed.
    Now that there is a Panic.argp field, update that instead.
    That can be done on entry only, so that unwinding doesn't
    need to worry about undoing anything. The wrappers
    emit a few more instructions in the prologue but everything
    else in the system gets much simpler.
    
    It also fixes (without trying) a broken test I never checked in.
    
    Fixes #7491.
    
    LGTM=khr
    R=khr
    CC=dvyukov, golang-codereviews, iant, r
    https://golang.org/cl/135490044
    84736957
recover.go 9.82 KB