ifwe / goconf

Automatically exported from code.google.com/p/goconf
0 stars 2 forks source link

Test failure in Go 1: slice bounds out of range #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
After applying patch from issue #18, the test suite does not pass:

$ go test

panic: runtime error: slice bounds out of range [recovered]
    panic: runtime error: slice bounds out of range

goroutine 3 [running]:
testing._func_003(0x7f8022577fa8, 0x7f8022577100, 0x7f8022577fb8, 
0x7f8022577ae0)
    /home/josh/go/src/pkg/testing/testing.go:268 +0xf3
----- stack segment boundary -----
code.google.com/p/goconf.(*ConfigFile).GetString(0xf84004e140, 0x4ec4fc, 0x9, 
0x4e5734, 0x3, ...)
    /home/josh/mygo/src/code.google.com/p/goconf/get.go:119 +0x348
code.google.com/p/goconf.TestBuild(0xf840000e00, 0x12153238)
    /home/josh/mygo/src/code.google.com/p/goconf/conf_test.go:57 +0x2ea
testing.tRunner(0xf840000e00, 0x5714d0, 0x0, 0x0)
    /home/josh/go/src/pkg/testing/testing.go:273 +0x6f
created by testing.RunTests
    /home/josh/go/src/pkg/testing/testing.go:349 +0x77c

goroutine 1 [chan receive]:
testing.RunTests(0x400c00, 0x5714d0, 0x100000001, 0x4ea401, 0xb, ...)
    /home/josh/go/src/pkg/testing/testing.go:350 +0x79f
testing.Main(0x400c00, 0x5714d0, 0x100000001, 0x5767f8, 0x0, ...)
    /home/josh/go/src/pkg/testing/testing.go:285 +0x7a
main.main()
    /tmp/go-build986806935/code.google.com/p/goconf/_test/_testmain.go:43 +0x91

goroutine 2 [syscall]:
created by runtime.main
    /home/josh/go/src/pkg/runtime/proc.c:221
exit status 2
FAIL    code.google.com/p/goconf    0.007s

It appears to be due to line 119 in get.go.

Original issue reported on code.google.com by jshholland on 29 Mar 2012 at 5:11

GoogleCodeExporter commented 8 years ago

Original comment by step...@q5comm.com on 8 May 2012 at 7:52