]> Cypherpunks repositories - gostls13.git/commit
runtime: fix memory corruption and leak in recursive panic handling
authorDmitriy Vyukov <dvyukov@google.com>
Fri, 7 Mar 2014 16:50:30 +0000 (20:50 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Fri, 7 Mar 2014 16:50:30 +0000 (20:50 +0400)
commitf946a7ca0971027a71e057c2650fdf63d54543e8
treecb71b4601e9b9147b8941a2cb07adfdeac986de2
parentb08156cd874d9534776cd9ece8f6f4ab092a68a5
runtime: fix memory corruption and leak in recursive panic handling
Recursive panics leave dangling Panic structs in g->panic stack.
At best it leads to a Defer leak and incorrect output on a subsequent panic.
At worst it arbitrary corrupts heap.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/72480043
src/pkg/runtime/crash_test.go
src/pkg/runtime/panic.c
src/pkg/runtime/runtime.h