• Russ Cox's avatar
    runtime: clear Defer.panic before removing from G.defer list · e6708ee9
    Russ Cox authored
    Another dangling stack pointer in a cached structure.
    Same as SudoG.elem and SudoG.selectdone.
    
    Definitely a fix, and the new test in freedefer makes the
    crash reproducible, but probably not a complete fix.
    I have seen one dangling pointer in a Defer.panic even
    after this fix; I cannot see where it could be coming from.
    
    I think this will fix the solaris build.
    I do not think this will fix the occasional failure on the darwin build.
    
    TBR=khr
    R=khr
    CC=golang-codereviews
    https://golang.org/cl/155080043
    e6708ee9
panic.c 5.15 KB