Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/gofmt: random stack overflow failures at tip #6168

Closed
fsouza opened this issue Aug 16, 2013 · 2 comments
Closed

cmd/gofmt: random stack overflow failures at tip #6168

fsouza opened this issue Aug 16, 2013 · 2 comments
Milestone

Comments

@fsouza
Copy link
Contributor

@fsouza fsouza commented Aug 16, 2013

Sometimes it works, sometimes it fails.

% uname -a
Darwin xikinbook.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May  1 17:57:12 PDT
2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
% go version
go version devel +0d127e5a7d36 Fri Aug 16 16:02:55 2013 +0400 darwin/amd64
% gofmt -s -w .
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

goroutine 1 [stack split]:
runtime/race.FuncExit(0x710008)
    /Users/f/lib/go/src/pkg/runtime/race/race.go:73 fp=0x7000e0
runtime.racefuncexit()
    /Users/f/lib/go/src/pkg/runtime/race.c:137 +0x2d fp=0x7000f0
go/printer.(*printer).exprList(0xc21003f140, 0x0, 0xc21002da80, 0x1, 0x1, ...)
    /Users/f/lib/go/src/pkg/go/printer/nodes.go:260 +0x62 fp=0x700378
go/printer.(*printer).spec(0xc21003f140, 0x588850, 0xc21001ec30, 0x1, 0x700501)
    /Users/f/lib/go/src/pkg/go/printer/nodes.go:1345 +0x950 fp=0x7004c8
go/printer.(*printer).genDecl(0xc21003f140, 0xc21000ae40)
    /Users/f/lib/go/src/pkg/go/printer/nodes.go:1402 +0xc50 fp=0x700650
go/printer.(*printer).decl(0xc21003f140, 0x5884d0, 0xc21000ae40)
    /Users/f/lib/go/src/pkg/go/printer/nodes.go:1530 +0x127 fp=0x7006e8
go/printer.(*printer).declList(0xc21003f140, 0xc21003b500, 0x6, 0x8)
    /Users/f/lib/go/src/pkg/go/printer/nodes.go:1573 +0x1f3 fp=0x700758
go/printer.(*printer).file(0xc21003f140, 0xc21003b600)
    /Users/f/lib/go/src/pkg/go/printer/nodes.go:1581 +0x261 fp=0x700800
go/printer.(*printer).printNode(0xc21003f140, 0x1a18c0, 0xc21003b600, 0x0, 0x0)
    /Users/f/lib/go/src/pkg/go/printer/printer.go:1026 +0xa1c fp=0x700958
go/printer.(*Config).fprint(0x700ab0, 0x588da0, 0xc210031230, 0xc21000a2c0, 0x1a18c0,
...)
    /Users/f/lib/go/src/pkg/go/printer/printer.go:1165 +0xff fp=0x7009f8
go/printer.(*Config).Fprint(0x700ab0, 0x588da0, 0xc210031230, 0xc21000a2c0, 0x1a18c0,
...)
    /Users/f/lib/go/src/pkg/go/printer/printer.go:1223 +0xa4 fp=0x700a48
main.processFile(0xc21002d4b0, 0xa, 0x0, 0x0, 0x588448, ...)
    /Users/f/lib/go/src/cmd/gofmt/gofmt.go:121 +0x497 fp=0x700bf0
main.visitFile(0xc21002d4b0, 0xa, 0x5883c0, 0xc21001e1e0, 0x0, ...)
    /Users/f/lib/go/src/cmd/gofmt/gofmt.go:160 +0xee fp=0x700c48
path/filepath.walk(0xc21002d4b0, 0xa, 0x5883c0, 0xc21001e1e0, 0x234448, ...)
    /Users/f/lib/go/src/pkg/path/filepath/path.go:341 +0xad fp=0x700d18
path/filepath.walk(0x7fff5fbff214, 0x1, 0x5883c0, 0xc21001e190, 0x234448, ...)
    /Users/f/lib/go/src/pkg/path/filepath/path.go:359 +0x444 fp=0x700de8
path/filepath.Walk(0x7fff5fbff214, 0x1, 0x234448, 0x0, 0x0)
    /Users/f/lib/go/src/pkg/path/filepath/path.go:380 +0xdc fp=0x700e30
main.walkDir(0x7fff5fbff214, 0x1)
    /Users/f/lib/go/src/cmd/gofmt/gofmt.go:169 +0x49 fp=0x700e60
main.gofmtMain()
    /Users/f/lib/go/src/cmd/gofmt/gofmt.go:218 +0x85f fp=0x700f38
main.main()
    /Users/f/lib/go/src/cmd/gofmt/gofmt.go:176 +0x2c fp=0x700f48
runtime.main()
    /Users/f/lib/go/src/pkg/runtime/proc.c:209 +0x11f fp=0x700fa0
runtime.goexit()
    /Users/f/lib/go/src/pkg/runtime/proc.c:1373 fp=0x700fa8

goroutine 3 [syscall]:
runtime.goexit()
    /Users/f/lib/go/src/pkg/runtime/proc.c:1373
@fsouza
Copy link
Contributor Author

@fsouza fsouza commented Aug 16, 2013

Comment 1:

Sorry, it's probably 6166. I've searched for "gofmt" only before opening the issue.
@dvyukov
Copy link
Member

@dvyukov dvyukov commented Aug 16, 2013

Comment 2:

This issue was closed by revision 187b9c6.

Status changed to Fixed.

@fsouza fsouza added fixed labels Aug 16, 2013
@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.