From 00b2a30fd4df92fe5ea879295d65c55bf1725fcb Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 17 Feb 2017 15:43:39 +0000 Subject: libgo: update to final Go 1.8 release Along with the update this fixes a problem that was always present but only showed up with the new reflect test. When a program used a **unsafe.Pointer and stored the value in an interface type, the generated type descriptor pointed to the GC data for *unsafe.Pointer. It did that by name, but we were not generating a variable with the right name. Reviewed-on: https://go-review.googlesource.com/37144 From-SVN: r245535 --- libgo/runtime/go-unsafe-pointer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libgo/runtime/go-unsafe-pointer.c') diff --git a/libgo/runtime/go-unsafe-pointer.c b/libgo/runtime/go-unsafe-pointer.c index cce2e95a..3a97ee1 100644 --- a/libgo/runtime/go-unsafe-pointer.c +++ b/libgo/runtime/go-unsafe-pointer.c @@ -85,6 +85,12 @@ static const String preflection_string = sizeof PREFLECTION - 1, }; +extern const uintptr pointer_unsafe_Pointer_gc[] + __asm__ (GOSYM_PREFIX "__go_td_pN14_unsafe.Pointer$gc"); + +const uintptr pointer_unsafe_Pointer_gc[] __attribute__((aligned(4))) = + {sizeof(void*), GC_APTR, 0, GC_END}; + const struct __go_ptr_type pointer_unsafe_Pointer = { /* __common */ @@ -104,7 +110,7 @@ const struct __go_ptr_type pointer_unsafe_Pointer = /* __equalfn */ &runtime_pointerequal_descriptor, /* __gc */ - unsafe_Pointer_gc, + pointer_unsafe_Pointer_gc, /* __reflection */ &preflection_string, /* __uncommon */ -- cgit v1.1