by commenting a println() statement. My bad? Big fan, Cheers, Dave.
package main
var s string
var pT int
func main() {
s = "(())"
pT = 0
p()
}
func p() {
if pT >= len(s) { return }
if s[pT] == '(' {
pT += 1
p()
if pT < len(s) && s[pT] == ')' {
pT += 1
} else {
// comment the following println and "nosplit stack overflow"
// otherwise it "works" (does not check paren balance)
println("problem",s)
return
}
p()
}
}
// output from rsc p.go test on Linux amd64 (tip 14715:4fa98cce4290):
//0000 (p.go:2) TEXT init·1+0(SB),$16-0
//0008 (p.go:4) TEXT init+0(SB),$0-0
On Monday, May 21, 2012 10:49:56 AM UTC-6, [email protected] wrote:
What causes the error: nosplit stack overflow?
I am running on Windows 7 X64 and I am working on a Go function (about 100
lines of code) and when I make a relatively small change, I get the error
below when building. Does anyone have any suggestions?
C:\GoExternal\src\mrasystem\document>go build mrasystem
# mrasystem
main.init: nosplit stack overflow
120 guaranteed after split check in main.init
112 on entry to mrasystem/toolbox/web.init
104 on entry to mrasystem/busops/busexec.init
96 on entry to mrasystem/claim.init
88 on entry to mrasystem/issues.init
80 on entry to mrasystem/contact.init
72 on entry to mrasystem/lookup.init
64 on entry to mrasystem/busops/businterface.init
56 on entry to mrasystem/systemserv.init
48 on entry to mra/weblogger.init
40 on entry to mra/goext.init
32 on entry to crypto/rand.init
24 on entry to math/big.init
16 on entry to math.init
8 on entry to math.init┬╖1
0 on entry to runtime.panicindex
-8 on entry to runtime.morestack00
runtime.main: nosplit stack overflow
120 guaranteed after split check in runtime.main
128 after runtime.main uses -8
120 on entry to main.init
112 on entry to mrasystem/toolbox/web.init
104 on entry to mrasystem/busops/busexec.init
96 on entry to mrasystem/claim.init
88 on entry to mrasystem/issues.init
80 on entry to mrasystem/contact.init
72 on entry to mrasystem/lookup.init
64 on entry to mrasystem/busops/businterface.init
56 on entry to mrasystem/systemserv.init
48 on entry to mra/weblogger.init
40 on entry to mra/goext.init
32 on entry to crypto/rand.init
24 on entry to math/big.init
16 on entry to math.init
8 on entry to math.init┬╖1
0 on entry to runtime.panicindex
-8 on entry to runtime.morestack00
What causes the error: nosplit stack overflow?
I am running on Windows 7 X64 and I am working on a Go function (about 100
lines of code) and when I make a relatively small change, I get the error
below when building. Does anyone have any suggestions?
C:\GoExternal\src\mrasystem\document>go build mrasystem
# mrasystem
main.init: nosplit stack overflow
120 guaranteed after split check in main.init
112 on entry to mrasystem/toolbox/web.init
104 on entry to mrasystem/busops/busexec.init
96 on entry to mrasystem/claim.init
88 on entry to mrasystem/issues.init
80 on entry to mrasystem/contact.init
72 on entry to mrasystem/lookup.init
64 on entry to mrasystem/busops/businterface.init
56 on entry to mrasystem/systemserv.init
48 on entry to mra/weblogger.init
40 on entry to mra/goext.init
32 on entry to crypto/rand.init
24 on entry to math/big.init
16 on entry to math.init
8 on entry to math.init┬╖1
0 on entry to runtime.panicindex
-8 on entry to runtime.morestack00
runtime.main: nosplit stack overflow
120 guaranteed after split check in runtime.main
128 after runtime.main uses -8
120 on entry to main.init
112 on entry to mrasystem/toolbox/web.init
104 on entry to mrasystem/busops/busexec.init
96 on entry to mrasystem/claim.init
88 on entry to mrasystem/issues.init
80 on entry to mrasystem/contact.init
72 on entry to mrasystem/lookup.init
64 on entry to mrasystem/busops/businterface.init
56 on entry to mrasystem/systemserv.init
48 on entry to mra/weblogger.init
40 on entry to mra/goext.init
32 on entry to crypto/rand.init
24 on entry to math/big.init
16 on entry to math.init
8 on entry to math.init┬╖1
0 on entry to runtime.panicindex
-8 on entry to runtime.morestack00