Skip to content

x/tools/go/types/typeutil: stack overflow when hashing recursive embedded type interface #26863

Closed
@dominikh

Description

@dominikh

What did you do?

Run ssadump on https://play.golang.org/p/TjieYyL9ily

What did you expect to see?

No crash

What did you see instead?

runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

runtime stack:
runtime.throw(0x70d2b9, 0xe)
	/home/dominikh/go/src/runtime/panic.go:608 +0x72
runtime.newstack()
	/home/dominikh/go/src/runtime/stack.go:1008 +0x729
runtime.morestack()
	/home/dominikh/go/src/runtime/asm_amd64.s:429 +0x8f

goroutine 1 [running]:
runtime.mapaccess2(0x6b5a00, 0xc000087b00, 0xc020140360, 0x0, 0x0)
	/home/dominikh/go/src/runtime/map.go:439 +0x22a fp=0xc020140320 sp=0xc020140318 pc=0x40da5a
golang.org/x/tools/go/types/typeutil.Hasher.Hash(0xc000087b00, 0x75d5a0, 0xc0000878f0, 0x756ea170f9470b)
	/home/dominikh/prj/src/golang.org/x/tools/go/types/typeutil/map.go:224 +0x59 fp=0xc020140380 sp=0xc020140320 pc=0x601329
golang.org/x/tools/go/types/typeutil.Hasher.hashFor(0xc000087b00, 0x75d4a0, 0xc0000cbae0, 0x95f2e0)
	/home/dominikh/prj/src/golang.org/x/tools/go/types/typeutil/map.go:285 +0x267 fp=0xc020140430 sp=0xc020140380 pc=0x601667
golang.org/x/tools/go/types/typeutil.Hasher.Hash(0xc000087b00, 0x75d4a0, 0xc0000cbae0, 0x0)
	/home/dominikh/prj/src/golang.org/x/tools/go/types/typeutil/map.go:226 +0x9a fp=0xc020140490 sp=0xc020140430 pc=0x60136a
golang.org/x/tools/go/types/typeutil.Hasher.hashTuple(0xc000087b00, 0xc00009c840, 0xc0000023b1)
	/home/dominikh/prj/src/golang.org/x/tools/go/types/typeutil/map.go:310 +0x70 fp=0xc0201404d8 sp=0xc020140490 pc=0x601cd0
golang.org/x/tools/go/types/typeutil.Hasher.hashFor(0xc000087b00, 0x75d5a0, 0xc0000878f0, 0x95f2e0)
	/home/dominikh/prj/src/golang.org/x/tools/go/types/typeutil/map.go:276 +0x33e fp=0xc020140588 sp=0xc0201404d8 pc=0x60173e
golang.org/x/tools/go/types/typeutil.Hasher.Hash(0xc000087b00, 0x75d5a0, 0xc0000878f0, 0x756ea170f9470b)
	/home/dominikh/prj/src/golang.org/x/tools/go/types/typeutil/map.go:226 +0x9a fp=0xc0201405e8 sp=0xc020140588 pc=0x60136a
golang.org/x/tools/go/types/typeutil.Hasher.hashFor(0xc000087b00, 0x75d4a0, 0xc0000cbae0, 0x95f2e0)
	/home/dominikh/prj/src/golang.org/x/tools/go/types/typeutil/map.go:285 +0x267 fp=0xc020140698 sp=0xc0201405e8 pc=0x601667
[...]
...additional frames elided...

/cc @alandonovan @griesemer

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions