https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82284
Bug ID: 82284 Summary: [7 Regression] go -version segfaults on big endian architectures Product: gcc Version: 7.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: doko at gcc dot gnu.org CC: cmang at google dot com Target Milestone: --- [forwarded from https://bugs.debian.org/876353] seen on the gcc-7-branch, last known working version on the branch was r251446. works on the gcc-6-branch and trunk. segmentation fault running `go-7 version` on ppc64 arch (BE). dmesg is [1619215.799421] go-7[12079]: unhandled signal 11 at 000000001010a540 nip 00007fff95bfadac lr 00007fff9705d458 code 30001 #0 __strrchr_vx () at ../sysdeps/s390/multiarch/strrchr-vx.S:46 #1 0x000003fffd622ca2 in elf_find_debugfile_by_debuglink (data=<optimized out>, error_callback=<optimized out>, debuglink_name=<optimized out>, filename=<optimized out>, state=<optimized out>) at ../../../src/libbacktrace/elf.c:862 #2 elf_open_debugfile_by_debuglink (data=<optimized out>, error_callback=<optimized out>, debuglink_crc=<optimized out>, debuglink_name=<optimized out>, filename=<optimized out>, state=<optimized out>) at ../../../src/libbacktrace/elf.c:923 #3 elf_add (state=0x3fffdfb1000, filename=filename@entry=0x7f7f7f7f7f7f7f7f <error: Cannot access memory at address 0x7f7f7f7f7f7f7f7f>, descriptor=<optimized out>, base_address=<optimized out>, error_callback=error_callback@entry=0x3fffd161868 <error_callback>, data=0x3ffffffe900, fileline_fn=0x3ffffffde48, found_sym=0x3ffffffe028, found_dwarf=0x3ffffffde44, exe=0, debuginfo=0) at ../../../src/libbacktrace/elf.c:1295 #4 0x000003fffd623248 in phdr_callback (info=0x3ffffffdf00, size=<optimized out>, pdata=0x3ffffffe038) at ../../../src/libbacktrace/elf.c:1453 #5 0x000003fffc4c0446 in __GI___dl_iterate_phdr ( callback=callback@entry=0x3fffd6231a0 <phdr_callback>, data=<optimized out>, data@entry=0x3ffffffe038) at dl-iteratephdr.c:76 #6 0x000003fffd6233e6 in backtrace_initialize (state=state@entry=0x3fffdfb1000, filename=filename@entry=0x3fffd826964 "/proc/self/exe", descriptor=<optimized out>, error_callback=error_callback@entry=0x3fffd161868 <error_callback>, data=data@entry=0x3ffffffe900, fileline_fn=0x3ffffffe130) at ../../../src/libbacktrace/elf.c:1495 #7 0x000003fffd6211a0 in fileline_initialize (state=state@entry=0x3fffdfb1000, error_callback=error_callback@entry=0x3fffd161868 <error_callback>, data=data@entry=0x3ffffffe900) at ../../../src/libbacktrace/fileline.c:136 #8 0x000003fffd621212 in backtrace_pcinfo (state=0x3fffdfb1000, pc=4397997627705, callback=0x3fffd1615d0 <callback>, error_callback=0x3fffd161868 <error_callback>, data=data@entry=0x3ffffffe900) at ../../../src/libbacktrace/fileline.c:170 #9 0x000003fffd6218c2 in unwind (context=<optimized out>, vdata=0x3ffffffe828) at ../../../src/libbacktrace/backtrace.c:91 #10 0x000003fffc18a064 in _Unwind_Backtrace () from /lib/s390x-linux-gnu/libgcc_s.so.1 #11 0x000003fffd621964 in backtrace_full (state=0x3fffdfb1000, skip=skip@entry=0, callback=callback@entry=0x3fffd1615d0 <callback>, error_callback=error_callback@entry=0x3fffd161868 <error_callback>, data=data@entry=0x3ffffffe900) at ../../../src/libbacktrace/backtrace.c:127 #12 0x000003fffd16193a in runtime_callers (skip=skip@entry=4, locbuf=locbuf@entry=0x3ffffffea10, m=m@entry=32, keep_thunks=keep_thunks@entry=false) at ../../../src/libgo/runtime/go-callers.c:170 #13 0x000003fffd588b3a in runtime.callers (skip=4, locbuf=...) at ../../../src/libgo/go/runtime/traceback_gccgo.go:63 #14 runtime.mProf_Malloc (p=<optimized out>, p@entry=<error reading variable: value has been optimized out>, size=size@entry=1536) data=data@entry=0x3ffffffe900) at ../../../src/libbacktrace/fileline.c:136 #8 0x000003fffd621212 in backtrace_pcinfo (state=0x3fffdfb1000, pc=4397997627705, callback=0x3fffd1615d0 <callback>, error_callback=0x3fffd161868 <error_callback>, data=data@entry=0x3ffffffe900) at ../../../src/libbacktrace/fileline.c:170 #9 0x000003fffd6218c2 in unwind (context=<optimized out>, vdata=0x3ffffffe828) at ../../../src/libbacktrace/backtrace.c:91 #10 0x000003fffc18a064 in _Unwind_Backtrace () from /lib/s390x-linux-gnu/libgcc_s.so.1 #11 0x000003fffd621964 in backtrace_full (state=0x3fffdfb1000, skip=skip@entry=0, callback=callback@entry=0x3fffd1615d0 <callback>, error_callback=error_callback@entry=0x3fffd161868 <error_callback>, data=data@entry=0x3ffffffe900) at ../../../src/libbacktrace/backtrace.c:127 #12 0x000003fffd16193a in runtime_callers (skip=skip@entry=4, locbuf=locbuf@entry=0x3ffffffea10, m=m@entry=32, keep_thunks=keep_thunks@entry=false) at ../../../src/libgo/runtime/go-callers.c:170 #13 0x000003fffd588b3a in runtime.callers (skip=4, locbuf=...) at ../../../src/libgo/go/runtime/traceback_gccgo.go:63 #14 runtime.mProf_Malloc (p=<optimized out>, p@entry=<error reading variable: value has been optimized out>, size=size@entry=1536) ---Type <return> to continue, or q <return> to quit--- at ../../../src/libgo/go/runtime/mprof.go:254 #15 0x000003fffd16fdea in runtime_profilealloc (size=1536, v=<optimized out>) at ../../../src/libgo/runtime/malloc.goc:308 #16 runtime_mallocgc (size=1536, size@entry=1432, typ=<optimized out>, typ@entry=4398009200432, flag=0) at ../../../src/libgo/runtime/malloc.goc:245 #17 0x000003fffd16237e in __go_new (td=td@entry=0x3fffdc6af30 <__go_tdn_runtime..runtime.g>, size=size@entry=1432) at ../../../src/libgo/runtime/go-new.c:15 #18 0x000003fffd56e5e4 in runtime.allocg () at ../../../src/libgo/go/runtime/stubs.go:514 #19 0x000003fffd16e8ac in runtime.malg (allocatestack=allocatestack@entry=true, signalstack=signalstack@entry=true, ret_stack=ret_stack@entry=0x3fffdeb9478 <runtime_m0+1960>, ret_stacksize=ret_stacksize@entry=0x3fffdeb9480 <runtime_m0+1968>) at ../../../src/libgo/runtime/proc.c:1349 #20 0x000003fffd57bdf8 in runtime.mpreinit (mp=0x3fffdeb8cd0 <runtime_m0>) at ../../../src/libgo/go/runtime/os_gccgo.go:17 #21 runtime.mcommoninit (mp=mp@entry=0x3fffdeb8cd0 <runtime_m0>) at ../../../src/libgo/go/runtime/proc.go:241 #22 0x000003fffd16dd0e in runtime_schedinit () at ../../../src/libgo/runtime/proc.c:490 #23 0x000002aa0004521c in main () #24 0x000003fffc3a2f4a in __libc_start_main (main=0x2aa00045180 <main>, argc=<optimized out>, argv=0x3fffffff678, init=<optimized out>, fini=0x2aa000a73a0, rtld_fini=0x3fffdf90b70 <_dl_fini>, stack_end=0x3fffffff5c0) at libc-start.c:308 #25 0x000002aa0004528c in ?? () PC not saved