]> Cypherpunks repositories - gostls13.git/commitdiff
- declaring large fixed arrays is causing runtime crash
authorRobert Griesemer <gri@golang.org>
Fri, 29 Aug 2008 20:47:29 +0000 (13:47 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 29 Aug 2008 20:47:29 +0000 (13:47 -0700)
R=ken
OCL=14658
CL=14660

test/bugs/bug092.go [new file with mode: 0644]
test/golden.out

diff --git a/test/bugs/bug092.go b/test/bugs/bug092.go
new file mode 100644 (file)
index 0000000..8f18c38
--- /dev/null
@@ -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?
+*/
index 1cae7f9f57c6a81219563b714dbb4bd23c14b4d8..af39350c1ad1c2956a7459446537ef9f5b1cb794 100644 (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