1
0
mirror of https://github.com/golang/go synced 2024-11-25 10:07:56 -07:00

- declaring large fixed arrays is causing runtime crash

R=ken
OCL=14658
CL=14660
This commit is contained in:
Robert Griesemer 2008-08-29 13:47:29 -07:00
parent 7b4d719686
commit fb4c2a3737
2 changed files with 23 additions and 0 deletions

19
test/bugs/bug092.go Normal file
View File

@ -0,0 +1,19 @@
// $G $D/$F.go && $L $F.$A && ./$A.out
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
func main() {
var a [1000] int64; // this alone works
var b [10000] int64; // this causes a runtime crash
}
/*
uetli:~/Source/go1/test/bugs gri$ 6g bug092.go && 6l bug092.6 && 6.out
Illegal instruction
gri: array size matters, possibly related to stack overflow check?
*/

View File

@ -188,6 +188,10 @@ BUG: compilation succeeds incorrectly
=========== bugs/bug091.go
BUG: compilation succeeds incorrectly
=========== bugs/bug092.go
BUG should not crash
/tmp/gorun-gri: line 1: 18181 Illegal instruction ./$A.out
=========== fixedbugs/bug015.go
fixedbugs/bug015.go:7: overflow converting constant to <int64>INT64