]> Cypherpunks repositories - gostls13.git/commit
runtime: save r11 in ARM addmoduledata
authorAustin Clements <austin@google.com>
Fri, 7 Jul 2017 18:59:35 +0000 (14:59 -0400)
committerAustin Clements <austin@google.com>
Fri, 7 Jul 2017 20:24:36 +0000 (20:24 +0000)
commit87a51a0787df797660b6462f2debb7188f50f249
treefdb15a0ac04b1054b5d20a3c0907646684686be8
parentc027ecfdbaccc3baca8b7a2bf828ec8ba26f20fd
runtime: save r11 in ARM addmoduledata

R11 is callee-save in the C ABI, but the temporary register in the Go
ABI. Currently it's being clobbered by runtime.addmoduledata, which
has to follow the C ABI. The observed effect of this was that
dl_open_worker was returning to a bad PC because after it failed to
restore its SP because it was using R11 as a frame pointer.

Fix this by saving R11 around addmoduledata.

Fixes #19674.

Change-Id: Iaacbcc76809a3aa536e9897770831dcbcb6c8245
Reviewed-on: https://go-review.googlesource.com/47831
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/asm_arm.s