]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't inline functions that call recover
authorAustin Clements <austin@google.com>
Thu, 25 Jan 2018 22:22:41 +0000 (17:22 -0500)
committerAustin Clements <austin@google.com>
Thu, 25 Jan 2018 23:15:55 +0000 (23:15 +0000)
commitb5b35be2b8a73b404290f7d0d4c14912a707f9a0
treed7dd33fa2603a17b1d4eb50b2b56b12155a7ef04
parent651ddbdb5056ded455f47f9c494c67b389622a47
cmd/compile: don't inline functions that call recover

recover determines whether it's being called by a deferred frame by
matching its caller's argument frame pointer with the one recorded in
the panic object. That means its caller needs a valid and unique
argument frame pointer, so it must not be inlined.

With this fix, test/recover.go passes with -l=4.

Fixes #23557.

Change-Id: I1f32a624c49e387cfc67893a0829bb248d69c3d4
Reviewed-on: https://go-review.googlesource.com/90035
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/inl.go