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

Issue 906041: code review 906041: runtime: turn divide by zero, nil dereference into panics (Closed)

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

Description

runtime: turn divide by zero, nil dereference into panics tested on linux/amd64, linux/386, linux/arm, darwin/amd64, darwin/386. freebsd untested; will finish in a separate CL. for now all the panics are errorStrings. richer structures can be added as necessary once the mechanism is shaked out.

Patch Set 1 #

Patch Set 2 : code review 906041: runtime: turn divide by zero, nil dereference into panics #

Total comments: 3

Patch Set 3 : code review 906041: runtime: turn divide by zero, nil dereference into panics #

Patch Set 4 : code review 906041: runtime: turn divide by zero, nil dereference into panics #

Unified diffs Side-by-side diffs Delta from patch set Stats (+837 lines, -70 lines) Patch
M src/pkg/runtime/darwin/386/defs.h View 2 chunks +45 lines, -1 line 0 comments Download
M src/pkg/runtime/darwin/386/signal.c View 1 2 2 chunks +33 lines, -5 lines 0 comments Download
M src/pkg/runtime/darwin/amd64/defs.h View 1 chunk +44 lines, -0 lines 0 comments Download
M src/pkg/runtime/darwin/amd64/signal.c View 1 2 2 chunks +34 lines, -5 lines 0 comments Download
M src/pkg/runtime/darwin/defs.c View 1 chunk +48 lines, -0 lines 0 comments Download
M src/pkg/runtime/darwin/os.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/darwin/signals.h View 3 chunks +6 lines, -4 lines 0 comments Download
M src/pkg/runtime/darwin/thread.c View 1 2 2 chunks +25 lines, -0 lines 0 comments Download
M src/pkg/runtime/freebsd/386/signal.c View 2 chunks +23 lines, -8 lines 0 comments Download
M src/pkg/runtime/freebsd/amd64/signal.c View 2 chunks +23 lines, -8 lines 0 comments Download
M src/pkg/runtime/freebsd/defs.c View 1 chunk +48 lines, -0 lines 0 comments Download
M src/pkg/runtime/freebsd/signals.h View 3 chunks +6 lines, -4 lines 0 comments Download
M src/pkg/runtime/freebsd/thread.c View 1 2 2 chunks +26 lines, -0 lines 0 comments Download
M src/pkg/runtime/linux/386/defs.h View 2 chunks +44 lines, -1 line 0 comments Download
M src/pkg/runtime/linux/386/signal.c View 1 2 2 chunks +25 lines, -8 lines 0 comments Download
M src/pkg/runtime/linux/amd64/defs.h View 2 chunks +49 lines, -0 lines 0 comments Download
M src/pkg/runtime/linux/amd64/signal.c View 1 2 2 chunks +27 lines, -10 lines 0 comments Download
M src/pkg/runtime/linux/arm/defs.h View 1 chunk +43 lines, -0 lines 0 comments Download
M src/pkg/runtime/linux/arm/signal.c View 1 2 chunks +24 lines, -8 lines 0 comments Download
M src/pkg/runtime/linux/defs.c View 1 chunk +47 lines, -0 lines 0 comments Download
M src/pkg/runtime/linux/defs1.c View 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/runtime/linux/defs2.c View 2 chunks +53 lines, -1 line 0 comments Download
M src/pkg/runtime/linux/defs_arm.c View 1 chunk +48 lines, -1 line 0 comments Download
M src/pkg/runtime/linux/os.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/linux/signals.h View 3 chunks +6 lines, -4 lines 0 comments Download
M src/pkg/runtime/linux/thread.c View 1 2 2 chunks +26 lines, -1 line 0 comments Download
M src/pkg/runtime/runtime.h View 2 chunks +4 lines, -0 lines 0 comments Download
A test/recover3.go View 1 2 1 chunk +78 lines, -0 lines 0 comments Download

Messages

Total messages: 4
rsc
Hello r (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 11 months ago (2010-04-08 23:48:57 UTC) #1
r
LGTM but please kill the gotos http://codereview.appspot.com/906041/diff/2001/3008 File src/pkg/runtime/darwin/thread.c (right): http://codereview.appspot.com/906041/diff/2001/3008#newcode454 src/pkg/runtime/darwin/thread.c:454: goto badaddr; goto ...
14 years, 11 months ago (2010-04-08 23:54:08 UTC) #2
rsc
Hello r (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 11 months ago (2010-04-09 00:57:44 UTC) #3
rsc
14 years, 11 months ago (2010-04-09 01:15:36 UTC) #4
*** Submitted as http://code.google.com/p/go/source/detail?r=0260ea3454a1 ***

runtime: turn divide by zero, nil dereference into panics

tested on linux/amd64, linux/386, linux/arm, darwin/amd64, darwin/386.
freebsd untested; will finish in a separate CL.

for now all the panics are errorStrings.
richer structures can be added as necessary
once the mechanism is shaked out.

R=r
CC=golang-dev
http://codereview.appspot.com/906041
Sign in to reply to this message.

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