]> Cypherpunks repositories - gostls13.git/commit
runtime: align stack pointer during initcgo call on arm
authorRuss Cox <rsc@golang.org>
Wed, 5 Aug 2015 03:44:06 +0000 (23:44 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 5 Aug 2015 05:31:34 +0000 (05:31 +0000)
commit2a60d77059201c9f1f09cb4885f690859d7bc643
treeff5caa8443a4603f40c184eb2f6ba2753bfdc9a2
parent31b0b73924e83fe3341e5c5ebca8854febcb3157
runtime: align stack pointer during initcgo call on arm

This is what is causing freebsd/arm to crash mysteriously when using cgo.
The bug was introduced in golang.org/cl/4030, which moved this code out
of rt0_go and into its own function. The ARM ABI says that calls must
be made with the stack pointer at an 8-byte boundary, but only FreeBSD
seems to crash when this is violated.

Fixes #10119.

Change-Id: Ibdbe76b2c7b80943ab66b8abbb38b47acb70b1e5
Reviewed-on: https://go-review.googlesource.com/13161
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
src/runtime/tls_arm.s