]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: prevent stack growth after fork in runtime.sigfillset
authorHaoran Luo <haoran.luo@chaitin.com>
Tue, 8 Dec 2020 14:29:04 +0000 (14:29 +0000)
committerAustin Clements <austin@google.com>
Wed, 9 Dec 2020 03:01:58 +0000 (03:01 +0000)
commit6fa06d960b5ec38867a35dc278ae318ecff1b6c6
treefca89816eb6d8840f7b501dc4c41ea2821ab4806
parentae9b442df2436b3d65ef765572681bf9aacdfbbb
runtime: prevent stack growth after fork in runtime.sigfillset

This fixes the unexpected growth of stack in child process, which
is caused by stack checking code in runtime.sigfillset called from
runtime.sigset while clearing the signal handlers in child process.

The redundant stack checking code is generated due to missing
'//go:nosplit' directive that should be annotated for
runtime.sigfillset.

Fixes #43066
Updates #21314

Change-Id: I9483a962a4b0747074313991841e2440ee32198c
Reviewed-on: https://go-review.googlesource.com/c/go/+/276173
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/os_linux_be64.go
src/runtime/os_linux_generic.go
src/runtime/os_linux_mips64x.go
src/runtime/os_linux_mipsx.go