https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68496
--- Comment #2 from İsmail Dönmez <ismail at i10z dot com> --- (In reply to Ian Lance Taylor from comment #1) > I can not recreate this problem. It works fine for me. > > The stack trace is incomplete for some reason so I don't know what is going > wrong. > > If you cd into x86_64-pc-linux-gnu/libgo, you can run > make GOTESTFLAGS="--keep" reflect/check > Presumably that will fail. It will leave behind a gotestNNNN directory. In > that directory you will find an a.out executable. Running that executable > runs the test (you may have to set LD_LIBRARY_PATH so that it finds > libgo.so). Try running that executable under gdb and see if you can get a > better backtrace. Try export MALLOC_CHECK_=2 before testing. Backtrace shows an invalid free: (gdb) bt #0 0x00007f8d36c51d38 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55 #1 0x00007f8d36c5318a in __GI_abort () at abort.c:78 #2 0x00007f8d36c960b0 in malloc_printerr (action=<optimized out>, str=0x7f8d36d840fa "free(): invalid pointer", ptr=<optimize d out>, ar_ptr=<optimized out>) at malloc.c:5004 #3 0x0000000000433298 in reflect.call.N13_reflect.Value (pointer=pointer@entry=0xc2080c56a0, op=..., param=...) at value.go:4 50 #4 0x00000000004328d4 in reflect.Call.N13_reflect.Value (pointer=pointer@entry=0x7f8d33da0c40, in=...) at value.go:300 #5 0x000000000044ec3a in reflect_test.TestCallWithStruct (t=<optimized out>) at all_test.go:1492 #6 0x00007f8d37e6f71c in testing.tRunner (test=0xc20807a318, param=<optimized out>) at ../../../libgo/go/testing/testing.go:4 55 #7 testing.$thunk15 (__go_thunk_parameter=<optimized out>) at ../../../libgo/go/testing/testing.go:560 #8 0x00007f8d37d8fa9c in kickoff () at ../../../libgo/runtime/proc.c:235 #9 0x00007f8d3812a135 in __morestack () at ../../../libgcc/config/i386/morestack.S:544 #10 0x00007f8d36c62900 in ?? () from /lib64/libc.so.6 #11 0x0000000000000000 in ?? ()