diff options
author | Russ Cox <rsc@golang.org> | 2019-06-05 12:31:42 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2019-06-06 00:11:29 +0000 |
commit | c00ff65d016c07f7feb188ca0458ae3bae0f1532 (patch) | |
tree | 309125bbbc653cb3407df085c55a49e5b54964e0 /src/runtime/sys_darwin_arm64.s | |
parent | e9073ef809895740b3e3876148af808c51c016d5 (diff) | |
download | go-c00ff65d016c07f7feb188ca0458ae3bae0f1532.tar.gz go-c00ff65d016c07f7feb188ca0458ae3bae0f1532.zip |
runtime: use default system stack size, not 64 kB, on non-cgo macOS
At least one libc call we make
(res_search, which calls _mdns_query and then mdns_item_call)
pushes a 64 kB stack frame onto the stack.
Then it faults on the guard page.
Use the default system stack size, under the assumption
that the C code being called is compatible with that stack size.
For #31705.
Change-Id: I1b0bfc2e54043c49f0709255988ef920ce30ee82
Reviewed-on: https://go-review.googlesource.com/c/go/+/180779
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/sys_darwin_arm64.s')
-rw-r--r-- | src/runtime/sys_darwin_arm64.s | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/sys_darwin_arm64.s b/src/runtime/sys_darwin_arm64.s index 79dd009f6f..af03af37bb 100644 --- a/src/runtime/sys_darwin_arm64.s +++ b/src/runtime/sys_darwin_arm64.s @@ -382,10 +382,10 @@ TEXT runtime·pthread_attr_init_trampoline(SB),NOSPLIT,$0 BL libc_pthread_attr_init(SB) RET -TEXT runtime·pthread_attr_setstacksize_trampoline(SB),NOSPLIT,$0 +TEXT runtime·pthread_attr_getstacksize_trampoline(SB),NOSPLIT,$0 MOVD 8(R0), R1 // arg 2 size MOVD 0(R0), R0 // arg 1 attr - BL libc_pthread_attr_setstacksize(SB) + BL libc_pthread_attr_getstacksize(SB) RET TEXT runtime·pthread_attr_setdetachstate_trampoline(SB),NOSPLIT,$0 |