1
0
mirror of https://github.com/golang/go synced 2024-11-13 17:10:21 -07:00
go/test
Russ Cox 5963dbac08 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
https://golang.org/cl/906041
2010-04-08 18:15:30 -07:00
..
bench test/bench: add k-nucleotide-parallel 2010-04-05 22:32:36 -07:00
bugs gc: bug265 2010-03-29 15:27:59 -07:00
chan runtime: correct memory leak in select 2010-04-01 11:56:18 -07:00
fixedbugs single argument panic 2010-03-30 10:34:57 -07:00
garbage delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
interface single argument panic 2010-03-30 10:34:57 -07:00
ken single argument panic 2010-03-30 10:34:57 -07:00
nilptr drop output from nilptr tests; 2009-11-09 23:11:36 -08:00
syntax gc: more syntax errors 2010-03-25 12:47:43 -07:00
64bit.go - gofmt these files 2009-12-09 16:55:03 -08:00
235.go single argument panic 2010-03-30 10:34:57 -07:00
args.go move things out of sys into os and runtime 2009-05-08 15:21:41 -07:00
arm-pass.txt arm: fix build, attempt #2 2010-04-06 18:30:36 -07:00
assign.go gc: check for assignment to private fields during initialization 2009-12-03 22:09:58 -08:00
bigalg.go unused imports 2009-09-17 10:27:04 -07:00
blank1.go write-only variable _ 2009-09-08 23:16:19 -07:00
blank.go making some more non-gofmt'ed files save for new semicolon rule 2009-12-09 19:27:08 -08:00
chancap.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
char_lit.go fix up some irregular indentation 2009-08-17 13:30:22 -07:00
closedchan.go add test for close/closed, fix a few implementation bugs. 2009-03-23 18:50:35 -07:00
closure.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
cmp1.go single argument panic 2010-03-30 10:34:57 -07:00
cmp2.go making some more non-gofmt'ed files save for new semicolon rule 2009-12-09 19:27:08 -08:00
cmp3.go making some more non-gofmt'ed files save for new semicolon rule 2009-12-09 19:27:08 -08:00
cmp4.go making some more non-gofmt'ed files save for new semicolon rule 2009-12-09 19:27:08 -08:00
cmp5.go making some more non-gofmt'ed files save for new semicolon rule 2009-12-09 19:27:08 -08:00
complit.go fix "declared and not used" in tests; 2009-09-14 21:03:53 -07:00
compos.go missing files; cleaned up g4 nothave output. 2009-09-24 13:38:18 -07:00
const1.go Cleaned up gccgo error messages require minor adjustment to 2009-11-05 16:04:45 -08:00
const2.go Recognize gccgo error message. 2009-03-16 21:48:07 -07:00
const3.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
const.go make 6g constants behave as ken proposes. (i hope.) 2009-03-12 19:04:38 -07:00
convert3.go more 6g reorg; checkpoint. 2009-08-03 11:58:52 -07:00
convert.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
convlit1.go more 6g reorg; checkpoint. 2009-08-03 11:58:52 -07:00
convlit.go gc: implement []int(string) and []byte(string) 2010-02-25 15:11:07 -08:00
copy.go - flip in and out to exercise overlap check a little (could do better) 2009-11-18 22:26:36 -08:00
ddd1.go Match gccgo error messages. 2010-02-05 18:38:27 -08:00
ddd2.go gc: add ... T, rework plain ... 2010-02-01 00:25:59 -08:00
ddd3.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
ddd.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
decl.go last round: non-package code 2009-09-15 12:42:24 -07:00
declbad.go last round: non-package code 2009-09-15 12:42:24 -07:00
defer.go Change type of Printf's args to ... interface{} 2010-02-02 10:53:37 +11:00
deferprint.go gc: implement defer print/println/panic/panicln 2010-01-27 15:37:08 -08:00
empty.go test of new empty productions 2008-10-08 15:33:18 -07:00
env.go Getenv: almost no one wants the error, so make it return a string that may be empty. 2009-06-26 20:28:41 -07:00
errchk handle compiler crash better: 2009-10-09 16:44:40 -07:00
escape.go gc: allow taking address of out parameters 2010-03-26 18:01:02 -07:00
float_lit.go making some more non-gofmt'ed files save for new semicolon rule 2009-12-09 19:27:08 -08:00
floatcmp.go gc: fix up floating point NaN comparisons 2009-11-15 17:24:14 -08:00
for.go fix bug depot: 2008-08-11 22:07:49 -07:00
func1.go Check for specific error messages in the testsuite. This 2008-09-19 14:39:49 -07:00
func2.go convert *[] to []. 2008-12-18 22:37:22 -08:00
func3.go change in spec results in non-error 2008-10-06 16:27:14 -07:00
func4.go more 6g reorg; checkpoint. 2009-08-03 11:58:52 -07:00
func5.go single argument panic 2010-03-30 10:34:57 -07:00
func.go delete export 2009-01-20 14:40:40 -08:00
gc1.go time tests; sort -nr times.out | sed 10q is illuminating. 2009-10-09 11:18:32 -07:00
gc.go finalizers; merge package malloc into package runtime 2010-02-03 16:31:34 -08:00
golden-arm.out arm: fix build, attempt #1 2010-04-06 17:56:48 -07:00
golden.out runtime: turn run time errors checks into panics 2010-04-01 22:31:27 -07:00
hashmap.go fix "declared and not used" in tests; 2009-09-14 21:03:53 -07:00
helloworld.go fix bug depot: 2008-08-11 22:07:49 -07:00
hilbert.go fix test 2009-07-07 10:30:31 -07:00
if1.go move things out of sys into os and runtime 2009-05-08 15:21:41 -07:00
if.go fix "declared and not used" in tests; 2009-09-14 21:03:53 -07:00
import1.go Match gccgo error messages. 2010-02-01 16:35:23 -08:00
import2.go gc: fix chan <- chan precedence. 2010-01-26 10:40:28 -08:00
import3.go gc: fix chan <- chan precedence. 2010-01-26 10:40:28 -08:00
import4.go gc: fix imported and not used message - show path 2010-03-03 17:23:47 -08:00
import.go implications of stricter type equality: 2009-05-08 15:40:14 -07:00
indirect1.go making some more non-gofmt'ed files save for new semicolon rule 2009-12-09 19:27:08 -08:00
indirect.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
initcomma.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
initialize.go last round: non-package code 2009-09-15 12:42:24 -07:00
initializerr.go Adjust expected errors to work with gccgo. 2009-05-31 11:18:52 -07:00
initsyscall.go unused imports 2009-09-17 10:27:04 -07:00
int_lit.go fix up some irregular indentation 2009-08-17 13:30:22 -07:00
intcvt.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
iota.go delete export 2009-01-20 14:40:40 -08:00
literal.go fix "declared and not used" in tests; 2009-09-14 21:03:53 -07:00
malloc1.go finalizers; merge package malloc into package runtime 2010-02-03 16:31:34 -08:00
mallocfin.go single argument panic 2010-03-30 10:34:57 -07:00
mallocrand.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
mallocrep1.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
mallocrep.go single argument panic 2010-03-30 10:34:57 -07:00
map.go time tests; sort -nr times.out | sed 10q is illuminating. 2009-10-09 11:18:32 -07:00
method1.go Enable these tests. Fix divconst.go and modconst.go to 2009-08-21 15:43:23 -07:00
method2.go delete export 2009-01-20 14:40:40 -08:00
method3.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
method.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
nacl-pass.txt nacl: fix build, finally fixed 8l convergence bug 2010-02-01 15:20:19 -08:00
named1.go gccgo does not distinguish "use" and "assign" in these error 2009-10-20 23:11:00 -07:00
named.go test: comparisons have type bool 2009-09-24 17:54:47 -07:00
nil.go fix "declared and not used" in tests; 2009-09-14 21:03:53 -07:00
nul1.go test: rename nul.go to nul1.go 2010-02-21 18:57:21 -08:00
parentype.go undo 35108 (disallow parens around type in struct literal). 2009-09-29 21:21:14 -07:00
peano.go single argument panic 2010-03-30 10:34:57 -07:00
printbig.go fix printing of -(1<<63) 2008-09-17 14:08:52 -07:00
range.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
recover1.go test for panic and recover 2010-03-31 11:47:09 -07:00
recover2.go runtime: two proc bug fixes 2010-04-06 13:48:31 -07:00
recover3.go runtime: turn divide by zero, nil dereference into panics 2010-04-08 18:15:30 -07:00
recover.go runtime: turn run time errors checks into panics 2010-04-01 22:31:27 -07:00
rename1.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
rename.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
run runtime: various arm fixes 2010-04-05 12:51:09 -07:00
run-arm arm: fix build, attempt #1 2010-04-06 17:56:48 -07:00
run-nacl nacl: fix build, finally fixed 8l convergence bug 2010-02-01 15:20:19 -08:00
runtime.go New gccgo error message; match both compilers with one string. 2010-01-30 11:31:30 -08:00
sieve.go fix up some irregular indentation 2009-08-17 13:30:22 -07:00
sigchld.go update Go tree to use new syscall package. 2009-06-01 22:14:39 -07:00
simassign.go single argument panic 2010-03-30 10:34:57 -07:00
stack.go delete all uses of panicln by rewriting them using panic or, 2010-03-24 16:46:53 -07:00
string_lit.go gc: implement []int(string) and []byte(string) 2010-02-25 15:11:07 -08:00
stringrange.go fix "declared and not used" in tests; 2009-09-14 21:03:53 -07:00
switch1.go move things out of sys into os and runtime 2009-05-08 15:21:41 -07:00
switch.go fix "declared and not used" in tests; 2009-09-14 21:03:53 -07:00
test0.go fix "declared and not used" in tests; 2009-09-14 21:03:53 -07:00
turing.go fix bug depot: 2008-08-11 22:07:49 -07:00
typeswitch1.go single argument panic 2010-03-30 10:34:57 -07:00
typeswitch2.go runtime, type switch: eliminate package global name space assumption 2010-01-25 18:23:20 -08:00
typeswitch.go move things out of sys into os and runtime 2009-05-08 15:21:41 -07:00
utf.go change utf8.FullRuneInString and utf8.DecodeRuneInString 2009-05-11 14:10:34 -07:00
varinit.go single argument panic 2010-03-30 10:34:57 -07:00
vectors.go single argument panic 2010-03-30 10:34:57 -07:00