aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-reflect.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-reflect.c
parent37cb25ed7acdb844b218231130e54b8b7a0ff6e6 (diff)
downloadgcc-9ff56c9570642711d5b7ab29920ecf5dbff14a27.zip
gcc-9ff56c9570642711d5b7ab29920ecf5dbff14a27.tar.gz
gcc-9ff56c9570642711d5b7ab29920ecf5dbff14a27.tar.bz2
Update to current version of Go library.
From-SVN: r173931
Diffstat (limited to 'libgo/runtime/go-reflect.c')
-rw-r--r--libgo/runtime/go-reflect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/runtime/go-reflect.c b/libgo/runtime/go-reflect.c
index 9485c09..bf13a11 100644
--- a/libgo/runtime/go-reflect.c
+++ b/libgo/runtime/go-reflect.c
@@ -121,6 +121,9 @@ Reflect (struct __go_empty_interface e)
{
struct reflect_ret ret;
+ if (((uintptr_t) e.__type_descriptor & reflectFlags) != 0)
+ __go_panic_msg ("invalid interface value");
+
if (e.__type_descriptor == NULL)
{
ret.rettype.__type_descriptor = NULL;
@@ -166,6 +169,9 @@ Typeof (const struct __go_empty_interface e)
{
struct __go_empty_interface ret;
+ if (((uintptr_t) e.__type_descriptor & reflectFlags) != 0)
+ __go_panic_msg ("invalid interface value");
+
if (e.__type_descriptor == NULL)
{
ret.__type_descriptor = NULL;