]> Cypherpunks repositories - gostls13.git/commit
cmd/compile, runtime: a different approach to duplicate itabs
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Mon, 12 Dec 2016 00:31:56 +0000 (13:31 +1300)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Mon, 19 Dec 2016 01:31:59 +0000 (01:31 +0000)
commit1ec64e9b63d4ab4c2e7e16fa1581a10ee0c80a1d
treec4e62b924b5ade353b949573f2fe89b30fa942e3
parent1106512db54fc2736c7a9a67dd553fc9e1fca742
cmd/compile, runtime: a different approach to duplicate itabs

golang.org/issue/17594 was caused by additab being called more than once for
an itab. golang.org/cl/32131 fixed that by making the itabs local symbols,
but that in turn causes golang.org/issue/18252 because now there are now
multiple itab symbols in a process for a given (type,interface) pair and
different code paths can end up referring to different itabs which breaks
lots of reflection stuff. So this makes itabs global again and just takes
care to only call additab once for each itab.

Fixes #18252

Change-Id: I781a193e2f8dd80af145a3a971f6a25537f633ea
Reviewed-on: https://go-review.googlesource.com/34173
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
misc/cgo/testshared/src/exe/exe.go
src/cmd/compile/internal/gc/reflect.go
src/runtime/iface.go
src/runtime/runtime2.go