]> Cypherpunks repositories - gostls13.git/commit
runtime/cgo: raise the thread-local storage slot search limit on Android
authorElias Naur <elias.naur@gmail.com>
Sat, 25 Mar 2017 11:55:40 +0000 (12:55 +0100)
committerElias Naur <elias.naur@gmail.com>
Mon, 27 Mar 2017 08:56:08 +0000 (08:56 +0000)
commit0476c7a7b50614f98f37a51ee2100af922288b68
tree42523650ad8f2a1b210d82d473c9198f70dc269a
parentaa4c2ca316b1553ae65a3e8afb4cf862e11b78d0
runtime/cgo: raise the thread-local storage slot search limit on Android

On Android, the thread local offset is found by looping through memory
starting at the TLS base address. The search is limited to
PTHREAD_KEYS_MAX, but issue 19472 made it clear that in some cases, the
slot is located further from the TLS base.

The limit is merely a sanity check in case our assumptions about the
thread-local storage layout are wrong, so this CL raises it to 384, which
is enough for the test case in issue 19472.

Fixes #19472

Change-Id: I89d1db3e9739d3a7fff5548ae487a7483c0a278a
Reviewed-on: https://go-review.googlesource.com/38636
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/cgo/gcc_android_arm.c
src/runtime/cgo/gcc_android_arm64.c