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

runtime: "slice bounds out of range" in runtime.(*addrRanges).add on js-wasm builder #36113

Closed
bcmills opened this issue Dec 12, 2019 · 2 comments
Labels
arch-wasm WebAssembly issues FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Dec 12, 2019

2019-11-26T21:15:47-368ea8f/js-wasm

fatal error: slice bounds out of range

runtime stack:
runtime.throw(0x83de3, 0x19)
	/workdir/go/src/runtime/panic.go:1106 +0x7
runtime.panicCheck1(0x11cd003f, 0x83de3, 0x19)
	/workdir/go/src/runtime/panic.go:40 +0x6
runtime.goPanicSliceB(0x11, 0x10)
	/workdir/go/src/runtime/panic.go:115 +0x2
runtime.(*addrRanges).add(0x32e0d0, 0x9000000, 0x9400000)
	/workdir/go/src/runtime/mranges.go:140 +0x3f
runtime.(*pageAlloc).grow(0x32e048, 0x9000000, 0x400000)
	/workdir/go/src/runtime/mpagealloc.go:357 +0x17
runtime.(*mheap).grow(0x32e040, 0x1c, 0x0)
	/workdir/go/src/runtime/mheap.go:1321 +0xa
runtime.(*mheap).allocSpan(0x32e040, 0x1c, 0x8610000, 0x346a88, 0x1e0f)
	/workdir/go/src/runtime/mheap.go:1120 +0x8e
runtime.(*mheap).alloc.func1()
	/workdir/go/src/runtime/mheap.go:867 +0x5
runtime.(*mheap).alloc(0x32e040, 0x1c, 0x139c0100, 0x32e040)
	/workdir/go/src/runtime/mheap.go:861 +0x2
runtime.largeAlloc(0x37f60, 0x139f0001, 0x75a7f68)
	/workdir/go/src/runtime/malloc.go:1150 +0x9
runtime.mallocgc.func1()
	/workdir/go/src/runtime/malloc.go:1045 +0x2
runtime.systemstack(0x34a1c0)
	/workdir/go/src/runtime/asm_wasm.s:166 +0x2
runtime.mstart()
	/workdir/go/src/runtime/proc.go:1077

CC @mknyszek @aclements

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. arch-wasm WebAssembly issues labels Dec 12, 2019
@bcmills bcmills added this to the Go1.14 milestone Dec 12, 2019
@cherrymui
Copy link
Member

https://go.googlesource.com/go/+/refs/heads/master/src/runtime/mranges.go#134
Looks like this should be len(oldRanges)+1.

@gopherbot
Copy link

Change https://golang.org/cl/211157 mentions this issue: runtime: fix off-by-1 error on address ranges

@golang golang locked and limited conversation to collaborators Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly issues FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants