• Austin Clements's avatar
    runtime: unwind BP in jmpdefer to match SP unwind · b92f4238
    Austin Clements authored
    The irregular calling convention for defers currently incorrectly
    manages the BP if frame pointers are enabled. Specifically, jmpdefer
    manipulates the SP as if its own caller, deferreturn, had returned.
    However, it does not manipulate the BP to match. As a result, when a
    BP-based traceback happens during a deferred function call, it unwinds
    to the function that performed the defer and then thinks that function
    called itself in an infinite regress.
    
    Fix this by making jmpdefer manipulate the BP as if deferreturn had
    actually returned.
    
    Fixes #12968.
    
    Updates #15840.
    
    Change-Id: Ic9cc7c863baeaf977883ed0c25a7e80e592cf066
    Reviewed-on: https://go-review.googlesource.com/23457Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    b92f4238
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...