summaryrefslogtreecommitdiff
path: root/libgo/runtime/go-eface-val-compare.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-05-20 00:18:15 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-05-20 00:18:15 +0000
commit9ff56c9570642711d5b7ab29920ecf5dbff14a27 (patch)
treec891bdec1e6f073f73fedeef23718bc3ac30d499 /libgo/runtime/go-eface-val-compare.c
parent37cb25ed7acdb844b218231130e54b8b7a0ff6e6 (diff)
downloadgcc-9ff56c9570642711d5b7ab29920ecf5dbff14a27.tar.gz
Update to current version of Go library.
From-SVN: r173931
Diffstat (limited to 'libgo/runtime/go-eface-val-compare.c')
-rw-r--r--libgo/runtime/go-eface-val-compare.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libgo/runtime/go-eface-val-compare.c b/libgo/runtime/go-eface-val-compare.c
index 319ede24301..d754cc5f36e 100644
--- a/libgo/runtime/go-eface-val-compare.c
+++ b/libgo/runtime/go-eface-val-compare.c
@@ -4,6 +4,7 @@
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
+#include "go-panic.h"
#include "go-type.h"
#include "interface.h"
@@ -19,6 +20,8 @@ __go_empty_interface_value_compare (
const struct __go_type_descriptor *left_descriptor;
left_descriptor = left.__type_descriptor;
+ if (((uintptr_t) left_descriptor & reflectFlags) != 0)
+ __go_panic_msg ("invalid interface value");
if (left_descriptor == NULL)
return 1;
if (!__go_type_descriptors_equal (left_descriptor, right_descriptor))