• Dmitriy Vyukov's avatar
    runtime: use gcpc/gcsp during traceback of goroutines in syscalls · 9c0500b4
    Dmitriy Vyukov authored
    gcpc/gcsp are used by GC in similar situation.
    gcpc/gcsp are also more stable than gp->sched,
    because gp->sched is mutated by entersyscall/exitsyscall
    in morestack and mcall. So it has higher chances of being inconsistent.
    Also, rename gcpc/gcsp to syscallpc/syscallsp.
    
    This is the same as reverted change 12250043
    with save marked as textflag 7.
    The problem was that if save calls morestack,
    then subsequent lessstack spoils g->sched.pc/sp.
    And that bad values were remembered in g->syscallpc/sp.
    Entersyscallblock had the same problem,
    but it was never triggered to date.
    
    R=golang-dev, rsc
    CC=golang-dev
    https://golang.org/cl/12478043
    9c0500b4
traceback_x86.c 6.82 KB