]> Cypherpunks repositories - gostls13.git/commit
runtime: make scan of pointer-in-interface same as scan of pointer
authorRuss Cox <rsc@golang.org>
Thu, 15 May 2014 19:53:36 +0000 (15:53 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 15 May 2014 19:53:36 +0000 (15:53 -0400)
commit68aaf2ccda2dff72ff9a0b368995f1f5614a0924
tree42d71cd7d7a3309dcb80abda57c9fd3f2910a962
parent27b98974964e9fd5d25ebef96b4ba11b99aaa8e1
runtime: make scan of pointer-in-interface same as scan of pointer

The GC program describing a data structure sometimes trusts the
pointer base type and other times does not (if not, the garbage collector
must fall back on per-allocation type information stored in the heap).
Make the scanning of a pointer in an interface do the same.
This fixes a crash in a particular use of reflect.SliceHeader.

Fixes #8004.

LGTM=khr
R=golang-codereviews, khr
CC=0xe2.0x9a.0x9b, golang-codereviews, iant, r
https://golang.org/cl/100470045
src/cmd/gc/reflect.c
src/pkg/runtime/mgc0.c
test/fixedbugs/issue8004.go [new file with mode: 0644]