diff options
author | Keith Randall <khr@golang.org> | 2017-01-11 15:14:06 -0800 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2017-01-17 22:37:19 +0000 |
commit | 81a61a96c9c9c67ac1256b443bd5a55ad8fafa0e (patch) | |
tree | d51d9c97a11d5f316697303cb7706bff9234ebe7 /src/runtime/plugin.go | |
parent | f674537cc9dccb0e28ae58277c139d0fb2c5c09f (diff) | |
download | go-81a61a96c9c9c67ac1256b443bd5a55ad8fafa0e.tar.gz go-81a61a96c9c9c67ac1256b443bd5a55ad8fafa0e.zip |
runtime: for plugins, don't add duplicate itabs
We already do this for shared libraries. Do it for plugins also.
Suggestions on how to test this would be welcome.
I'd like to get this in for 1.8. It could lead to mysterious
hangs when using plugins.
Fixes #18676
Change-Id: I03209b096149090b9ba171c834c5e59087ed0f92
Reviewed-on: https://go-review.googlesource.com/35117
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Diffstat (limited to 'src/runtime/plugin.go')
-rw-r--r-- | src/runtime/plugin.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/plugin.go b/src/runtime/plugin.go index 80869e1b1c..8edb29c9fe 100644 --- a/src/runtime/plugin.go +++ b/src/runtime/plugin.go @@ -56,7 +56,9 @@ func plugin_lastmoduleinit() (path string, syms map[string]interface{}, mismatch lock(&ifaceLock) for _, i := range md.itablinks { - additab(i, true, false) + if i.inhash == 0 { + additab(i, true, false) + } } unlock(&ifaceLock) |