Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9)

Issue 72480043: code review 72480043: runtime: fix memory corruption and leak in recursive pa... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by dvyukov
Modified:
11 years, 3 months ago
Reviewers:
rsc
CC:
rsc, golang-codereviews
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r 72b4b258b09b https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r 72b4b258b09b https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r 72b4b258b09b https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 10

Patch Set 5 : diff -r 72b4b258b09b https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 6 : diff -r 3766534aabb9 https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -1 line) Patch
M src/pkg/runtime/crash_test.go View 1 2 2 chunks +38 lines, -0 lines 0 comments Download
M src/pkg/runtime/panic.c View 1 2 3 4 4 chunks +36 lines, -1 line 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 4
dvyukov
Hello rsc@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
11 years, 3 months ago (2014-03-07 15:47:27 UTC) #1
rsc
LGTM Thanks very much for finding this. Just some naming and comment comments. https://codereview.appspot.com/72480043/diff/60001/src/pkg/runtime/panic.c File ...
11 years, 3 months ago (2014-03-07 16:34:48 UTC) #2
dvyukov
https://codereview.appspot.com/72480043/diff/60001/src/pkg/runtime/panic.c File src/pkg/runtime/panic.c (right): https://codereview.appspot.com/72480043/diff/60001/src/pkg/runtime/panic.c#newcode208 src/pkg/runtime/panic.c:208: static void skippanic(Panic*); On 2014/03/07 16:34:49, rsc wrote: > ...
11 years, 3 months ago (2014-03-07 16:49:38 UTC) #3
dvyukov
11 years, 3 months ago (2014-03-07 16:50:34 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=2bf62ae2b687 ***

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://codereview.appspot.com/72480043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b