runtime: unwind BP in jmpdefer to match SP unwind
runtime: unwind BP in jmpdefer to match SP unwind

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/23457
Reviewed-by: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>
Run-TryBot: Austin Clements <7ea35d812706d9213868749011af1ed4fa2f6aa0@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

vsekhar/elastic-go,polyverse-security/go,ImJasonH/go,theif519/go,josharian/go,CAFxX/go,momchil-velikov/go,josharian/go,codestation/go,momchil-velikov/go,codestation/go,nawawi/go,golang/go,cloudflare/go,CAFxX/go,4ad/go,codestation/go,4ad/go,4ad/go,cloudflare/go,polyverse-security/go,akutz/go,theif519/go,theif519/go,codestation/go,polyverse-security/go,CAFxX/go,vsekhar/elastic-go,4ad/go,golang/go,akutz/go,josharian/go,suncycheng/go,cloudflare/go,suncycheng/go,nawawi/go,CAFxX/go,nawawi/go,polyverse-security/go,suncycheng/go,cloudflare/go,goodlang/good,goodlang/good,suncycheng/go,goodlang/good,momchil-velikov/go,josharian/go,akutz/go,Cofyc/go,cloudflare/go,cloudflare/go,CAFxX/go,vsekhar/elastic-go,linux-on-ibm-z/go,golang/go,Cofyc/go,momchil-velikov/go,linux-on-ibm-z/go,ImJasonH/go,theif519/go,josharian/go,theif519/go,ImJasonH/go,4ad/go,polyverse-security/go,ImJasonH/go,golang/go,goodlang/good,goodlang/good,Cofyc/go,suncycheng/go,Cofyc/go,golang/go,linux-on-ibm-z/go,josharian/go,suncycheng/go,CAFxX/go,derekmarcotte/go,golang/go,nawawi/go,derekmarcotte/go,theif519/go,vsekhar/elastic-go,linux-on-ibm-z/go,vsekhar/elastic-go,codestation/go,linux-on-ibm-z/go,vsekhar/elastic-go,theif519/go,momchil-velikov/go,goodlang/good,Cofyc/go,suncycheng/go,ImJasonH/go,polyverse-security/go,akutz/go,derekmarcotte/go,vsekhar/elastic-go,nawawi/go,golang/go,derekmarcotte/go,akutz/go,nawawi/go,ImJasonH/go,golang/go,linux-on-ibm-z/go,linux-on-ibm-z/go,momchil-velikov/go,josharian/go,Cofyc/go,codestation/go,momchil-velikov/go,polyverse-security/go,Cofyc/go,cloudflare/go,momchil-velikov/go,linux-on-ibm-z/go,theif519/go,polyverse-security/go,christopher-henderson/Go,vsekhar/elastic-go,goodlang/good,CAFxX/go,ImJasonH/go,4ad/go,derekmarcotte/go,CAFxX/go,nawawi/go,Cofyc/go,akutz/go,nawawi/go,akutz/go,codestation/go,derekmarcotte/go,akutz/go,josharian/go,suncycheng/go,derekmarcotte/go,4ad/go,derekmarcotte/go,4ad/go,cloudflare/go,ImJasonH/go,codestation/go,goodlang/good