From 81a61a96c9c9c67ac1256b443bd5a55ad8fafa0e Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Wed, 11 Jan 2017 15:14:06 -0800 Subject: 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 Reviewed-by: Ian Lance Taylor Reviewed-by: Michael Hudson-Doyle --- src/runtime/plugin.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/runtime/plugin.go') 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) -- cgit v1.3-5-g9baa