FAQ
Russ, maybe of no interest, but the following code turns this fault on/off
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, lukem...@gmail.com 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

Search Discussions

  • Minux at Oct 30, 2012 at 8:34 pm

    On Wed, Oct 31, 2012 at 12:10 AM, wrote:

    Russ, maybe of no interest, but the following code turns this fault on/off
    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
    Ack'd on tip. Please file an issue.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 30, '12 at 4:11p
activeOct 30, '12 at 8:34p
posts2
users2
websitegolang.org

2 users in discussion

Minux: 1 post Dhwellsjr: 1 post

People

Translate

site design / logo © 2022 Grokbase