Closed
Description
What steps will reproduce the problem? 1. go run this program: package main type Big [50]int64 func main() { seen := make(map[Big]bool) pow := Big{0: 2} for b := 0; b < 100; b++ { seen[pow] = true } } What is the expected output? What do you see instead? Expected: nothing. Got: $ go run crash.go panic: invalid memory address or nil pointer dereference throw: panic during gc [signal 0xb code=0x1 addr=0x0 pc=0x404ada] goroutine 1 [running]: main.main() /tmp/crash.go:9 +0xa6 goroutine 2 [syscall]: created by runtime.main /build/src/release-build/src/pkg/runtime/proc.c:221 exit status 2 GDB trace: (gdb) run Starting program: /tmp/crash [New LWP 15165] Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 15165] ReleaseN (c=void, l=void, n=void, sizeclass=void) at /opt/remy/go/src/pkg/runtime/mcache.c:63 63 lp = &(*lp)->next; (gdb) bt #0 ReleaseN (c=void, l=void, n=void, sizeclass=void) at /opt/remy/go/src/pkg/runtime/mcache.c:63 #1 0x0000000000404cdb in runtime.MCache_ReleaseAll (c=void) at /opt/remy/go/src/pkg/runtime/mcache.c:126 #2 0x0000000000407465 in stealcache () at /opt/remy/go/src/pkg/runtime/mgc0.c:882 #3 0x0000000000407869 in runtime.gc (force=void) at /opt/remy/go/src/pkg/runtime/mgc0.c:998 #4 0x000000000040fea3 in runtime.mallocgc (size=void, flag=void, dogc=void, zeroed=void) at /opt/remy/go/src/pkg/runtime/malloc.goc:97 #5 0x0000000000410aa5 in runtime.mal (n=void) at /opt/remy/go/src/pkg/runtime/malloc.goc:432 #6 0x000000000040244f in hash_subtable_new (h=void, power=void, used=void) at /opt/remy/go/src/pkg/runtime/hashmap.c:73 #7 0x0000000000402dad in hash_grow (t=void, h=void, pst=void, flags=void) at /opt/remy/go/src/pkg/runtime/hashmap.c:240 I use linux/amd64. Happens with go1 as well as tip (go version weekly.2012-03-27 +d9a1980f5814)
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
remyoudompheng commentedon Apr 28, 2012
Comment 1:
Owner changed to ---.
robpike commentedon Apr 28, 2012
Comment 2:
Labels changed: added priority-asap, removed priority-triage.
Owner changed to @dvyukov.
Status changed to Accepted.
ianlancetaylor commentedon Apr 29, 2012
Comment 3:
Owner changed to ---.
ianlancetaylor commentedon Apr 30, 2012
Comment 4:
Labels changed: added go1.0.2.
rsc commentedon May 25, 2012
Comment 5:
This issue was closed by revision bf18d57.
Status changed to Fixed.
kortschak commentedon Jun 2, 2012
Comment 6:
rsc commentedon Jun 14, 2012
Comment 8:
[release-branch.go1] runtime: handle and test large map values