]> Cypherpunks repositories - gostls13.git/commit
runtime: impose stack size limit
authorRuss Cox <rsc@golang.org>
Fri, 16 Aug 2013 02:34:06 +0000 (22:34 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 16 Aug 2013 02:34:06 +0000 (22:34 -0400)
commit757e0de89f80e89626cc8b7d6e670c0e5ea7f192
tree42b7768f368edc26299146007ebf0777618fa677
parent205329aaf2ec9aff13c4052f6dfa552e65760ea9
runtime: impose stack size limit

The goal is to stop only those programs that would keep
going and run the machine out of memory, but before they do that.
1 GB on 64-bit, 250 MB on 32-bit.
That seems implausibly large, and it can be adjusted.

Fixes #2556.
Fixes #4494.
Fixes #5173.

R=khr, r, dvyukov
CC=golang-dev
https://golang.org/cl/12541052
src/pkg/runtime/crash_test.go
src/pkg/runtime/debug/garbage.go
src/pkg/runtime/panic.c
src/pkg/runtime/proc.c
src/pkg/runtime/runtime.h
src/pkg/runtime/stack.c