-
Keith Randall authored
A few libc_ calls were missing stack switches. Unfortunately, adding the stack switches revealed a deeper problem. systemstack() is fundamentally flawed because when you do systemstack(func() { ... }) There's no way to mark the anonymous function as nosplit. At first I thought it didn't matter, as that function runs on the g0 stack. But nosplit is still required, because some syscalls are done when stack bounds are not set up correctly (e.g. in a signal handler, which runs on the g0 stack, but g is still pointing at the g stack). Instead use asmcgocall and funcPC, so we can be nosplit all the way down. Mid-stack inlining now pushes darwin over the nosplit limit also. Leaving that as a TODO. Update #23168 This might fix the cause of occasional darwin hangs. Update #25181 Update #17490 Change-Id: If9c3ef052822c7679f5a1dd192443f714483327e Reviewed-on: https://go-review.googlesource.com/111258Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
e86c2678
Name |
Last commit
|
Last update |
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README.md | ||
favicon.ico | ||
robots.txt |