https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80914
Bug ID: 80914 Summary: gcc-go binaries don't run Product: gcc Version: 7.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: steven at uplinklabs dot net CC: cmang at google dot com Target Milestone: --- I can't seem to get gcc-go to work in my builds of GCC, and I don't understand why. Here's my build configuration: $ gcc -v Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc-multilib/src/gcc/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://www.uplinklabs.net/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror --enable-__cxa_atexit --enable-checking=release --enable-clocale=gnu --enable-gnu-indirect-function --enable-gnu-unique-object --enable-install-libiberty --enable-libmpx --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --with-isl --with-linker-hash-style=gnu --with-multilib-list=m32,m64,mx32 --with-system-zlib Thread model: posix gcc version 7.1.1 20170529 (GCC) Whenever I run the gcc-provided 'go' binary, I just get this: $ go.gcc fatal error: DWARF underflow in .debug_info at 4 runtime stack: fatal error: DWARF underflow in .debug_info at 4 panic during panic runtime stack: Segmentation fault (core dumped) $ Assuming my GCC build process is doing what it should, the go.gcc binary should have debug info and not be stripped, and 'file' appears to agree that's the case: $ file /usr/bin/go.gcc /usr/bin/go.gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=4467591638a8ccaebbab3384129ec221295ad6a9, not stripped, with debug_info But based on the "DWARF underflow" messages, I guess the debug information in the binary is somehow broken? Here's what GDB has to say about it: $ gdb go.gcc GNU gdb (GDB) 7.12.1 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from go.gcc...done. (gdb) run Starting program: /usr/bin/go.gcc [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". fatal error: DWARF underflow in .debug_info at 4 runtime stack: fatal error: DWARF underflow in .debug_info at 4 panic during panic runtime stack: Program received signal SIGSEGV, Segmentation fault. __generic_morestack (pframe_size=0x7ffff7fa3250, old_stack=0x7ffff7fa3270, param_size=0) at /build/gcc-multilib/src/gcc/libgcc/generic-morestack.c:573 573 /build/gcc-multilib/src/gcc/libgcc/generic-morestack.c: No such file or directory. (gdb) bt full #0 __generic_morestack (pframe_size=0x7ffff7fa3250, old_stack=0x7ffff7fa3270, param_size=0) at /build/gcc-multilib/src/gcc/libgcc/generic-morestack.c:573 frame_size = 1544 current = 0x7ffff6e80840 <error_callback> pp = 0x7ffff7fa3008 dynamic = 0x0 from = <optimized out> to = <optimized out> ret = <optimized out> i = <optimized out> aligned = <optimized out> #1 0x00007ffff7314581 in __morestack () at /build/gcc-multilib/src/gcc/libgcc/config/i386/morestack.S:510 No locals. #2 0x00007ffff7306510 in dwarf_buf_error (buf=buf@entry=0x7ffff7fa34b0, msg=msg@entry=0x7ffff74b777f "DWARF underflow") at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:380 b = "DWARF underflow in .debug_info at 4", '\000' <repeats 164 times> #3 0x00007ffff7306a58 in require (count=<optimized out>, buf=<optimized out>) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:394 No locals. #4 advance (buf=0x7ffff7fa34b0, count=<optimized out>) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:407 count = <optimized out> buf = 0x7ffff7fa34b0 #5 0x00007ffff7306b17 in read_uint16 (buf=buf@entry=0x7ffff7fa34b0) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:445 p = 0x7ffff5778f99 "" #6 0x00007ffff7309ab4 in build_address_map (addrs=0x7ffff7fa3450, data=0x7ffff7fa3cd0, error_callback=0x7ffff6e80840 <error_callback>, is_bigendian=0, dwarf_str_size=20125, dwarf_str=0x7ffff57a4b37 "\001", dwarf_ranges_size=10767, dwarf_ranges=0x7ffff57bede9 "\001", dwarf_abbrev_size=2071, dwarf_abbrev=0x7ffff579bbbc "\001", dwarf_info_size=142375, dwarf_info=0x7ffff5778f95 "\001", base_address=0, state=0x7ffff7fa7000) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:1461 len = <optimized out> unit_buf = { name = 0x7ffff74b77f5 ".debug_info", start = 0x7ffff5778f95 "\001", buf = 0x7ffff5778f99 "", left = 1, is_bigendian = 0, error_callback = 0x7ffff6e80840 <error_callback>, data = 0x7ffff7fa3cd0, reported_underflow = 0 } u = <optimized out> unit_data_start = <optimized out> is_dwarf64 = 0 version = <optimized out> info = { name = 0x7ffff74b77f5 ".debug_info", start = 0x7ffff5778f95 "\001", buf = 0x7ffff5778f9a "", left = 142370, is_bigendian = 0, error_callback = 0x7ffff6e80840 <error_callback>, data = 0x7ffff7fa3cd0, reported_underflow = 0 } abbrevs = { num_abbrevs = 0, abbrevs = 0x0 } #7 build_dwarf_data (data=0x7ffff7fa3cd0, error_callback=0x7ffff6e80840 <error_callback>, is_bigendian=0, dwarf_str_size=20125, dwarf_str=0x7ffff57a4b37 "\001", dwarf_ranges_size=10767, dwarf_ranges=0x7ffff57bede9 "\001", dwarf_abbrev_size=2071, dwarf_abbrev=0x7ffff579bbbc "\001", dwarf_line_size=34660, dwarf_line=0x7ffff579c3d3 "\001", dwarf_info_size=142375, dwarf_info=0x7ffff5778f95 "\001", base_address=0, state=0x7ffff7fa7000) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:2932 addrs_vec = { vec = { base = 0x0, size = 0, alc = 0 }, count = 0 } addrs = <optimized out> addrs_count = <optimized out> fdata = <optimized out> #8 backtrace_dwarf_add (state=state@entry=0x7ffff7fa7000, base_address=base_address@entry=0, dwarf_info=0x7ffff5778f95 "\001", dwarf_info_size=142375, dwarf_line=0x7ffff579c3d3 "\001", dwarf_line_size=34660, dwarf_abbrev=0x7ffff579bbbc "\001", dwarf_abbrev_size=2071, dwarf_ranges=0x7ffff57bede9 "\001", dwarf_ranges_size=10767, dwarf_str=0x7ffff57a4b37 "\001", dwarf_str_size=20125, is_bigendian=0, error_callback=0x7ffff6e80840 <error_callback>, data=0x7ffff7fa3cd0, fileline_fn=0x7ffff7fa3898) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:2992 No locals. #9 0x00007ffff730b4a1 in elf_add (state=state@entry=0x7ffff7fa7000, descriptor=descriptor@entry=3, base_address=base_address@entry=0, error_callback=error_callback@entry=0x7ffff6e80840 <error_callback>, data=data@entry=0x7ffff7fa3cd0, fileline_fn=fileline_fn@entry=0x7ffff7fa3898, found_sym=0x7ffff7fa3890, found_dwarf=0x7ffff7fa3894, exe=1) at /build/gcc-multilib/src/gcc/libbacktrace/elf.c:817 ehdr_view = { data = 0x7ffff7fa1000, base = 0x7ffff7fa1000, len = 4096 } ehdr = { e_ident = {<optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, 1 '\001', <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>}, e_type = <optimized out>, e_machine = <optimized out>, e_version = <optimized out>, e_entry = <optimized out>, e_phoff = <optimized out>, e_shoff = <optimized out>, e_flags = <optimized out>, e_ehsize = <optimized out>, e_phentsize = <optimized out>, e_phnum = <optimized out>, e_shentsize = <optimized out>, e_shnum = <optimized out>, e_shstrndx = <optimized out> } shoff = <optimized out> shnum = <optimized out> shstrndx = <optimized out> shdrs_view = { data = 0x7ffff7fa09c8, base = 0x7ffff7fa0000, len = 8192 } shdrs_view_valid = 0 shdrs = <optimized out> shstrhdr = <optimized out> shstr_size = <optimized out> shstr_off = <optimized out> names_view = { data = 0x7ffff7f9f7f8, base = 0x7ffff7f9f000, len = 4096 } names_view_valid = 0 names = <optimized out> symtab_shndx = <optimized out> dynsym_shndx = <optimized out> i = <optimized out> sections = {{ offset = 1105813, size = 142375, data = 0x7ffff5778f95 "\001" }, { offset = 1250259, size = 34660, data = 0x7ffff579c3d3 "\001" }, { offset = 1248188, size = 2071, data = 0x7ffff579bbbc "\001" }, { offset = 1392105, size = 10767, data = 0x7ffff57bede9 "\001" }, { offset = 1284919, size = 20125, data = 0x7ffff57a4b37 "\001" }} symtab_view = { data = 0x7ffff7f7c080, base = 0x7ffff7f7c000, len = 122880 } symtab_view_valid = 1 strtab_view = { data = 0x7ffff7e58030, base = 0x7ffff7e58000, len = 122880 } strtab_view_valid = 1 min_offset = 1105813 max_offset = <optimized out> debug_view = { data = 0x7ffff5778f95, base = 0x7ffff5778000, len = 303104 } debug_view_valid = 1 #10 0x00007ffff730b947 in backtrace_initialize (state=state@entry=0x7ffff7fa7000, descriptor=3, error_callback=error_callback@entry=0x7ffff6e80840 <error_callback>, data=data@entry=0x7ffff7fa3cd0, fileline_fn=fileline_fn@entry=0x7ffff7fa3930) at /build/gcc-multilib/src/gcc/libbacktrace/elf.c:933 ret = <optimized out> found_sym = 1 found_dwarf = 0 elf_fileline_fn = 0x7ffff730aba0 <elf_nodebug> pd = { state = 0x7ffff7fa38b0, error_callback = 0x479a3d36df4bbb00, data = 0x7ffff7fa3c70, fileline_fn = 0x0, found_sym = 0x1, found_dwarf = 0x7ffff7fa3ac0, exe_descriptor = -134596144 } #11 0x00007ffff730a38a in fileline_initialize (state=0x7ffff7fa7000, error_callback=0x7ffff6e80840 <error_callback>, data=0x7ffff7fa3cd0) at /build/gcc-multilib/src/gcc/libbacktrace/fileline.c:136 fileline_fn = 0x0 failed = <optimized out> pass = <optimized out> called_error_callback = 0 descriptor = <optimized out> failed = <optimized out> #12 0x00007ffff730a432 in backtrace_pcinfo (state=0x7ffff7fa7000, pc=140737335789816, callback=0x7ffff6e805c0 <callback>, error_callback=0x7ffff6e80840 <error_callback>, data=0x7ffff7fa3cd0) at /build/gcc-multilib/src/gcc/libbacktrace/fileline.c:170 No locals. #13 0x00007ffff730a9f6 in unwind (context=<optimized out>, vdata=0x7ffff7fa3c80) at /build/gcc-multilib/src/gcc/libbacktrace/backtrace.c:91 bdata = 0x7ffff7fa3c80 pc = <optimized out> ip_before_insn = 0 #14 0x00007ffff57d2999 in _Unwind_Backtrace (trace=0x7ffff730a950 <unwind>, trace_argument=0x7ffff7fa3c80) at /build/gcc-multilib/src/gcc/libgcc/unwind.inc:295 fs = { regs = { reg = {{ loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }, { loc = { reg = 18446744073709551600, offset = -16, exp = 0xfffffffffffffff0 <error: Cannot access memory at address 0xfffffffffffffff0> }, how = REG_SAVED_OFFSET }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED } <repeats 12 times>, { loc = { reg = 18446744073709551608, offset = -8, exp = 0xfffffffffffffff8 <error: Cannot access memory at address 0xfffffffffffffff8> }, how = REG_SAVED_OFFSET }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }}, prev = 0x0, cfa_offset = 48, cfa_reg = 7, cfa_exp = 0x0, cfa_how = CFA_REG_OFFSET }, pc = 0x7ffff6e80915 <runtime_callers+133>, personality = 0x0, data_align = -8, code_align = 1, retaddr_column = 16, fde_encoding = 27 '\033', lsda_encoding = 255 '\377', saw_z = 1 '\001', signal_frame = 0 '\000', eh_ptr = 0x0 } context = { reg = {0x0, 0x0, 0x0, 0x7ffff7fa3cc0, 0x0, 0x0, 0x7ffff7fa3c70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7ffff7fa3c50, 0x7ffff7fa3c58, 0x7ffff7fa3c60, 0x7ffff7fa3c68, 0x7ffff7fa3cc8, 0x0}, cfa = 0x7ffff7fa3cd0, ra = 0x7ffff6e808f9 <runtime_callers+105>, lsda = 0x0, bases = { tbase = 0x0, dbase = 0x0, func = 0x7ffff6e80890 <runtime_callers> }, flags = 4611686018427387904, version = 0, args_size = 0, by_value = '\000' <repeats 17 times> } code = _URC_NO_REASON #15 0x00007ffff730aa79 in backtrace_full (state=0x7ffff7fa7000, skip=skip@entry=0, callback=callback@entry=0x7ffff6e805c0 <callback>, error_callback=error_callback@entry=0x7ffff6e80840 <error_callback>, data=data@entry=0x7ffff7fa3cd0) at /build/gcc-multilib/src/gcc/libbacktrace/backtrace.c:127 bdata = { skip = 0, state = 0x7ffff7fa7000, callback = 0x7ffff6e805c0 <callback>, error_callback = 0x7ffff6e80840 <error_callback>, data = 0x7ffff7fa3cd0, ret = 0, can_alloc = 1 } p = <optimized out> #16 0x00007ffff6e808f9 in runtime_callers (skip=<optimized out>, locbuf=locbuf@entry=0x7ffff7fa3d20, m=m@entry=100, keep_thunks=keep_thunks@entry=false) at /build/gcc-multilib/src/gcc/libgo/runtime/go-callers.c:170 data = { locbuf = 0x7ffff7fa3d20, skip = 2, index = 0, max = 100, keep_thunks = 0 } #17 0x00007ffff7262158 in runtime.traceback (skip=<optimized out>) at /build/gcc-multilib/src/gcc/libgo/go/runtime/traceback_gccgo.go:72 locbuf = {{ pc = 0, filename = 0x0 "", function = 0x0 "", lineno = 0 } <repeats 100 times>} c = <optimized out> #18 0x00007ffff73145c5 in __morestack () at /build/gcc-multilib/src/gcc/libgcc/config/i386/morestack.S:544 No locals. #19 0x00007ffff72625ec in runtime.dopanic (unused=0) at /build/gcc-multilib/src/gcc/libgo/go/runtime/panic.go:835 gp = 0x7ffff7dcb2e0 <runtime_g0> level = 2 all = <optimized out> docrash = false _g_ = <optimized out> #20 0x00007ffff7269f6a in runtime.startpanic () at /build/gcc-multilib/src/gcc/libgo/go/runtime/panic.go:792 _g_ = 0x7ffff7dcb2e0 <runtime_g0> #21 0x00007ffff7262715 in runtime.throw (s=...) at /build/gcc-multilib/src/gcc/libgo/go/runtime/panic.go:757 gp = <optimized out> #22 0x00007ffff6e8ab9f in runtime_throw (s=s@entry=0x7fffffff9910 "DWARF underflow in .debug_info at 4") at /build/gcc-multilib/src/gcc/libgo/runtime/panic.c:13 No locals. #23 0x00007ffff6e80872 in error_callback (data=<optimized out>, msg=<optimized out>, errnum=<optimized out>) at /build/gcc-multilib/src/gcc/libgo/runtime/go-callers.c:154 data = <optimized out> errnum = <optimized out> msg = 0x7fffffff9910 "DWARF underflow in .debug_info at 4" #24 0x00007ffff7306510 in dwarf_buf_error (buf=buf@entry=0x7fffffff9b50, msg=msg@entry=0x7ffff74b777f "DWARF underflow") at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:380 b = "DWARF underflow in .debug_info at 4", '\000' <repeats 164 times> #25 0x00007ffff7306a58 in require (count=<optimized out>, buf=<optimized out>) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:394 No locals. #26 advance (buf=0x7fffffff9b50, count=<optimized out>) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:407 count = <optimized out> buf = 0x7fffffff9b50 #27 0x00007ffff7306b17 in read_uint16 (buf=buf@entry=0x7fffffff9b50) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:445 p = 0x7ffff7e76f99 "" #28 0x00007ffff7309ab4 in build_address_map (addrs=0x7fffffff9af0, data=0x7fffffffa370, error_callback=0x7ffff6e80840 <error_callback>, is_bigendian=0, dwarf_str_size=20125, dwarf_str=0x7ffff7ea2b37 "\001", dwarf_ranges_size=10767, dwarf_ranges=0x7ffff7ebcde9 "\001", dwarf_abbrev_size=2071, dwarf_abbrev=0x7ffff7e99bbc "\001", dwarf_info_size=142375, dwarf_info=0x7ffff7e76f95 "\001", base_address=0, state=0x7ffff7fa7000) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:1461 len = <optimized out> unit_buf = { name = 0x7ffff74b77f5 ".debug_info", start = 0x7ffff7e76f95 "\001", buf = 0x7ffff7e76f99 "", left = 1, is_bigendian = 0, error_callback = 0x7ffff6e80840 <error_callback>, data = 0x7fffffffa370, reported_underflow = 0 } u = <optimized out> unit_data_start = <optimized out> is_dwarf64 = 0 version = <optimized out> info = { name = 0x7ffff74b77f5 ".debug_info", start = 0x7ffff7e76f95 "\001", buf = 0x7ffff7e76f9a "", left = 142370, is_bigendian = 0, error_callback = 0x7ffff6e80840 <error_callback>, data = 0x7fffffffa370, reported_underflow = 0 } abbrevs = { num_abbrevs = 0, abbrevs = 0x0 } #29 build_dwarf_data (data=0x7fffffffa370, error_callback=0x7ffff6e80840 <error_callback>, is_bigendian=0, dwarf_str_size=20125, dwarf_str=0x7ffff7ea2b37 "\001", dwarf_ranges_size=10767, dwarf_ranges=0x7ffff7ebcde9 "\001", dwarf_abbrev_size=2071, dwarf_abbrev=0x7ffff7e99bbc "\001", dwarf_line_size=34660, dwarf_line=0x7ffff7e9a3d3 "\001", dwarf_info_size=142375, dwarf_info=0x7ffff7e76f95 "\001", base_address=0, state=0x7ffff7fa7000) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:2932 addrs_vec = { vec = { base = 0x0, size = 0, alc = 0 }, count = 0 } addrs = <optimized out> addrs_count = <optimized out> fdata = <optimized out> #30 backtrace_dwarf_add (state=state@entry=0x7ffff7fa7000, base_address=base_address@entry=0, dwarf_info=0x7ffff7e76f95 "\001", dwarf_info_size=142375, dwarf_line=0x7ffff7e9a3d3 "\001", dwarf_line_size=34660, dwarf_abbrev=0x7ffff7e99bbc "\001", dwarf_abbrev_size=2071, dwarf_ranges=0x7ffff7ebcde9 "\001", dwarf_ranges_size=10767, dwarf_str=0x7ffff7ea2b37 "\001", dwarf_str_size=20125, is_bigendian=0, error_callback=0x7ffff6e80840 <error_callback>, data=0x7fffffffa370, fileline_fn=0x7fffffff9f38) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:2992 No locals. #31 0x00007ffff730b4a1 in elf_add (state=state@entry=0x7ffff7fa7000, descriptor=descriptor@entry=3, base_address=base_address@entry=0, error_callback=error_callback@entry=0x7ffff6e80840 <error_callback>, data=data@entry=0x7fffffffa370, fileline_fn=fileline_fn@entry=0x7fffffff9f38, found_sym=0x7fffffff9f30, found_dwarf=0x7fffffff9f34, exe=1) at /build/gcc-multilib/src/gcc/libbacktrace/elf.c:817 ehdr_view = { data = 0x7ffff7fa4000, base = 0x7ffff7fa4000, len = 4096 } ehdr = { e_ident = {<optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, 1 '\001', <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>}, e_type = <optimized out>, e_machine = <optimized out>, e_version = <optimized out>, e_entry = <optimized out>, e_phoff = <optimized out>, e_shoff = <optimized out>, e_flags = <optimized out>, e_ehsize = <optimized out>, e_phentsize = <optimized out>, e_phnum = <optimized out>, e_shentsize = <optimized out>, e_shnum = <optimized out>, e_shstrndx = <optimized out> } shoff = <optimized out> shnum = <optimized out> shstrndx = <optimized out> shdrs_view = { data = 0x7ffff7fa39c8, base = 0x7ffff7fa3000, len = 8192 } shdrs_view_valid = 0 shdrs = <optimized out> shstrhdr = <optimized out> shstr_size = <optimized out> shstr_off = <optimized out> names_view = { data = 0x7ffff7fa27f8, base = 0x7ffff7fa2000, len = 4096 } names_view_valid = 0 names = <optimized out> symtab_shndx = <optimized out> dynsym_shndx = <optimized out> i = <optimized out> sections = {{ offset = 1105813, size = 142375, data = 0x7ffff7e76f95 "\001" }, { offset = 1250259, size = 34660, data = 0x7ffff7e9a3d3 "\001" }, { offset = 1248188, size = 2071, data = 0x7ffff7e99bbc "\001" }, { offset = 1392105, size = 10767, data = 0x7ffff7ebcde9 "\001" }, { offset = 1284919, size = 20125, data = 0x7ffff7ea2b37 "\001" }} symtab_view = { data = 0x7ffff7f7c080, base = 0x7ffff7f7c000, len = 122880 } symtab_view_valid = 1 strtab_view = { data = 0x7ffff7edb030, base = 0x7ffff7edb000, len = 122880 } strtab_view_valid = 1 min_offset = 1105813 max_offset = <optimized out> debug_view = { data = 0x7ffff7e76f95, base = 0x7ffff7e76000, len = 303104 } debug_view_valid = 1 #32 0x00007ffff730b947 in backtrace_initialize (state=state@entry=0x7ffff7fa7000, descriptor=3, error_callback=error_callback@entry=0x7ffff6e80840 <error_callback>, data=data@entry=0x7fffffffa370, fileline_fn=fileline_fn@entry=0x7fffffff9fd0) at /build/gcc-multilib/src/gcc/libbacktrace/elf.c:933 ret = <optimized out> found_sym = 1 found_dwarf = 0 elf_fileline_fn = 0x7ffff730aba0 <elf_nodebug> pd = { state = 0x7fffffff9f50, error_callback = 0x479a3d36df4bbb00, data = 0x7fffffffa310, fileline_fn = 0x0, found_sym = 0x1, found_dwarf = 0x7fffffffa160, exe_descriptor = -24464 } #33 0x00007ffff730a38a in fileline_initialize (state=0x7ffff7fa7000, error_callback=0x7ffff6e80840 <error_callback>, data=0x7fffffffa370) at /build/gcc-multilib/src/gcc/libbacktrace/fileline.c:136 fileline_fn = 0x0 failed = <optimized out> pass = <optimized out> called_error_callback = 0 descriptor = <optimized out> failed = <optimized out> #34 0x00007ffff730a432 in backtrace_pcinfo (state=0x7ffff7fa7000, pc=140737335789816, callback=0x7ffff6e805c0 <callback>, error_callback=0x7ffff6e80840 <error_callback>, data=0x7fffffffa370) at /build/gcc-multilib/src/gcc/libbacktrace/fileline.c:170 No locals. #35 0x00007ffff730a9f6 in unwind (context=<optimized out>, vdata=0x7fffffffa320) at /build/gcc-multilib/src/gcc/libbacktrace/backtrace.c:91 bdata = 0x7fffffffa320 pc = <optimized out> ip_before_insn = 0 #36 0x00007ffff57d2999 in _Unwind_Backtrace (trace=0x7ffff730a950 <unwind>, trace_argument=0x7fffffffa320) at /build/gcc-multilib/src/gcc/libgcc/unwind.inc:295 fs = { regs = { reg = {{ loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }, { loc = { reg = 18446744073709551600, offset = -16, exp = 0xfffffffffffffff0 <error: Cannot access memory at address 0xfffffffffffffff0> }, how = REG_SAVED_OFFSET }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED } <repeats 12 times>, { loc = { reg = 18446744073709551608, offset = -8, exp = 0xfffffffffffffff8 <error: Cannot access memory at address 0xfffffffffffffff8> }, how = REG_SAVED_OFFSET }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }}, prev = 0x0, cfa_offset = 48, cfa_reg = 7, cfa_exp = 0x0, cfa_how = CFA_REG_OFFSET }, pc = 0x7ffff6e80915 <runtime_callers+133>, personality = 0x0, data_align = -8, code_align = 1, retaddr_column = 16, fde_encoding = 27 '\033', lsda_encoding = 255 '\377', saw_z = 1 '\001', signal_frame = 0 '\000', eh_ptr = 0x0 } context = { reg = {0x0, 0x0, 0x0, 0x7fffffffa360, 0x0, 0x0, 0x7fffffffa310, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7fffffffa2f0, 0x7fffffffa2f8, 0x7fffffffa300, 0x7fffffffa308, 0x7fffffffa368, 0x0}, cfa = 0x7fffffffa370, ra = 0x7ffff6e808f9 <runtime_callers+105>, lsda = 0x0, bases = { tbase = 0x0, dbase = 0x0, func = 0x7ffff6e80890 <runtime_callers> }, flags = 4611686018427387904, version = 0, args_size = 0, by_value = '\000' <repeats 17 times> } code = _URC_NO_REASON #37 0x00007ffff730aa79 in backtrace_full (state=0x7ffff7fa7000, skip=skip@entry=0, callback=callback@entry=0x7ffff6e805c0 <callback>, error_callback=error_callback@entry=0x7ffff6e80840 <error_callback>, data=data@entry=0x7fffffffa370) at /build/gcc-multilib/src/gcc/libbacktrace/backtrace.c:127 bdata = { skip = 0, state = 0x7ffff7fa7000, callback = 0x7ffff6e805c0 <callback>, error_callback = 0x7ffff6e80840 <error_callback>, data = 0x7fffffffa370, ret = 0, can_alloc = 1 } p = <optimized out> #38 0x00007ffff6e808f9 in runtime_callers (skip=<optimized out>, locbuf=locbuf@entry=0x7fffffffa3c0, m=m@entry=100, keep_thunks=keep_thunks@entry=false) at /build/gcc-multilib/src/gcc/libgo/runtime/go-callers.c:170 data = { locbuf = 0x7fffffffa3c0, skip = 2, index = 0, max = 100, keep_thunks = 0 } #39 0x00007ffff7262158 in runtime.traceback (skip=skip@entry=0) at /build/gcc-multilib/src/gcc/libgo/go/runtime/traceback_gccgo.go:72 locbuf = {{ pc = 0, filename = 0x0 "", function = 0x0 "", lineno = 0 } <repeats 100 times>} c = <optimized out> #40 0x00007ffff72625ec in runtime.dopanic (unused=0) at /build/gcc-multilib/src/gcc/libgo/go/runtime/panic.go:835 gp = 0x7ffff7dcb2e0 <runtime_g0> level = 2 all = <optimized out> docrash = false _g_ = <optimized out> #41 0x00007ffff726271a in runtime.throw (s=...) at /build/gcc-multilib/src/gcc/libgo/go/runtime/panic.go:758 gp = <optimized out> #42 0x00007ffff6e8ab9f in runtime_throw (s=s@entry=0x7fffffffb710 "DWARF underflow in .debug_info at 4") at /build/gcc-multilib/src/gcc/libgo/runtime/panic.c:13 No locals. #43 0x00007ffff6e80872 in error_callback (data=<optimized out>, msg=<optimized out>, errnum=<optimized out>) at /build/gcc-multilib/src/gcc/libgo/runtime/go-callers.c:154 data = <optimized out> errnum = <optimized out> msg = 0x7fffffffb710 "DWARF underflow in .debug_info at 4" #44 0x00007ffff7306510 in dwarf_buf_error (buf=buf@entry=0x7fffffffb950, msg=msg@entry=0x7ffff74b777f "DWARF underflow") at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:380 b = "DWARF underflow in .debug_info at 4\000\377\177\000\000@`\376\016\000\000\000\000\201\371;\000\000\000\000\000\030\065E\366\377\177\000\000p\270\377\377\377\177\000\000\210\063\061\366\377\177\000\000\224\267\377\377\377\177\000\000`\270\377\377\377\177\000\000\320\331\371\367\377\177\000\000\a\000\000\000\000\000\000\000\240\270\377\377\000\000\000\000ȭ\277\365\377\177\000\000ķ\377\377", '\000' <repeats 12 times>, "\320\331\371\367\377\177\000\000X\303\371\367\377\177\000\000\000\271\377\377\377\177\000\000\000\000\000\000\000\000\000\000\001", '\000' <repeats 15 times>, "(\271\377\377\377\177\000" #45 0x00007ffff7306a58 in require (count=<optimized out>, buf=<optimized out>) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:394 No locals. #46 advance (buf=0x7fffffffb950, count=<optimized out>) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:407 count = <optimized out> buf = 0x7fffffffb950 #47 0x00007ffff7306b17 in read_uint16 (buf=buf@entry=0x7fffffffb950) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:445 p = 0x7ffff7ef9f99 "" #48 0x00007ffff7309ab4 in build_address_map (addrs=0x7fffffffb8f0, data=0x7fffffffc170, error_callback=0x7ffff6e80840 <error_callback>, is_bigendian=0, dwarf_str_size=20125, dwarf_str=0x7ffff7f25b37 "\001", dwarf_ranges_size=10767, dwarf_ranges=0x7ffff7f3fde9 "\001", dwarf_abbrev_size=2071, dwarf_abbrev=0x7ffff7f1cbbc "\001", dwarf_info_size=142375, dwarf_info=0x7ffff7ef9f95 "\001", base_address=0, state=0x7ffff7fa7000) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:1461 len = <optimized out> unit_buf = { name = 0x7ffff74b77f5 ".debug_info", start = 0x7ffff7ef9f95 "\001", buf = 0x7ffff7ef9f99 "", left = 1, is_bigendian = 0, error_callback = 0x7ffff6e80840 <error_callback>, data = 0x7fffffffc170, reported_underflow = 0 } u = <optimized out> unit_data_start = <optimized out> is_dwarf64 = 0 version = <optimized out> info = { name = 0x7ffff74b77f5 ".debug_info", start = 0x7ffff7ef9f95 "\001", buf = 0x7ffff7ef9f9a "", left = 142370, is_bigendian = 0, error_callback = 0x7ffff6e80840 <error_callback>, data = 0x7fffffffc170, reported_underflow = 0 } abbrevs = { num_abbrevs = 0, abbrevs = 0x0 } #49 build_dwarf_data (data=0x7fffffffc170, error_callback=0x7ffff6e80840 <error_callback>, is_bigendian=0, dwarf_str_size=20125, dwarf_str=0x7ffff7f25b37 "\001", dwarf_ranges_size=10767, dwarf_ranges=0x7ffff7f3fde9 "\001", dwarf_abbrev_size=2071, dwarf_abbrev=0x7ffff7f1cbbc "\001", dwarf_line_size=34660, dwarf_line=0x7ffff7f1d3d3 "\001", dwarf_info_size=142375, dwarf_info=0x7ffff7ef9f95 "\001", base_address=0, state=0x7ffff7fa7000) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:2932 addrs_vec = { vec = { base = 0x0, size = 0, alc = 0 }, count = 0 } addrs = <optimized out> addrs_count = <optimized out> fdata = <optimized out> #50 backtrace_dwarf_add (state=state@entry=0x7ffff7fa7000, base_address=base_address@entry=0, dwarf_info=0x7ffff7ef9f95 "\001", dwarf_info_size=142375, dwarf_line=0x7ffff7f1d3d3 "\001", dwarf_line_size=34660, dwarf_abbrev=0x7ffff7f1cbbc "\001", dwarf_abbrev_size=2071, dwarf_ranges=0x7ffff7f3fde9 "\001", dwarf_ranges_size=10767, dwarf_str=0x7ffff7f25b37 "\001", dwarf_str_size=20125, is_bigendian=0, error_callback=0x7ffff6e80840 <error_callback>, data=0x7fffffffc170, fileline_fn=0x7fffffffbd38) at /build/gcc-multilib/src/gcc/libbacktrace/dwarf.c:2992 No locals. #51 0x00007ffff730b4a1 in elf_add (state=state@entry=0x7ffff7fa7000, descriptor=descriptor@entry=3, base_address=base_address@entry=0, error_callback=error_callback@entry=0x7ffff6e80840 <error_callback>, data=data@entry=0x7fffffffc170, fileline_fn=fileline_fn@entry=0x7fffffffbd38, found_sym=0x7fffffffbd30, found_dwarf=0x7fffffffbd34, exe=1) at /build/gcc-multilib/src/gcc/libbacktrace/elf.c:817 ehdr_view = { data = 0x7ffff7fa5000, base = 0x7ffff7fa5000, len = 4096 } ehdr = { e_ident = {<optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, 1 '\001', <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>}, e_type = <optimized out>, e_machine = <optimized out>, e_version = <optimized out>, e_entry = <optimized out>, e_phoff = <optimized out>, e_shoff = <optimized out>, e_flags = <optimized out>, e_ehsize = <optimized out>, e_phentsize = <optimized out>, e_phnum = <optimized out>, e_shentsize = <optimized out>, e_shnum = <optimized out>, e_shstrndx = <optimized out> } shoff = <optimized out> shnum = <optimized out> shstrndx = <optimized out> shdrs_view = { data = 0x7ffff7fa49c8, base = 0x7ffff7fa4000, len = 8192 } shdrs_view_valid = 0 shdrs = <optimized out> shstrhdr = <optimized out> shstr_size = <optimized out> shstr_off = <optimized out> names_view = { data = 0x7ffff7fa37f8, base = 0x7ffff7fa3000, len = 4096 } names_view_valid = 0 names = <optimized out> symtab_shndx = <optimized out> dynsym_shndx = <optimized out> i = <optimized out> sections = {{ offset = 1105813, size = 142375, data = 0x7ffff7ef9f95 "\001" }, { offset = 1250259, size = 34660, data = 0x7ffff7f1d3d3 "\001" }, { offset = 1248188, size = 2071, data = 0x7ffff7f1cbbc "\001" }, { offset = 1392105, size = 10767, data = 0x7ffff7f3fde9 "\001" }, { offset = 1284919, size = 20125, data = 0x7ffff7f25b37 "\001" }} symtab_view = { data = 0x7ffff7f7c080, base = 0x7ffff7f7c000, len = 122880 } symtab_view_valid = 1 strtab_view = { data = 0x7ffff7f5e030, base = 0x7ffff7f5e000, len = 122880 } strtab_view_valid = 1 min_offset = 1105813 max_offset = <optimized out> debug_view = { data = 0x7ffff7ef9f95, base = 0x7ffff7ef9000, len = 303104 } debug_view_valid = 1 #52 0x00007ffff730b947 in backtrace_initialize (state=state@entry=0x7ffff7fa7000, descriptor=3, error_callback=error_callback@entry=0x7ffff6e80840 <error_callback>, data=data@entry=0x7fffffffc170, fileline_fn=fileline_fn@entry=0x7fffffffbdd0) at /build/gcc-multilib/src/gcc/libbacktrace/elf.c:933 ret = <optimized out> found_sym = 1 found_dwarf = 0 elf_fileline_fn = 0x7ffff730aba0 <elf_nodebug> pd = { state = 0x7fffffffbd50, error_callback = 0x479a3d36df4bbb00, data = 0x3, fileline_fn = 0x7fffffffc170, found_sym = 0x3, found_dwarf = 0x7fffffffc170, exe_descriptor = -152565696 } #53 0x00007ffff730a38a in fileline_initialize (state=0x7ffff7fa7000, error_callback=0x7ffff6e80840 <error_callback>, data=0x7fffffffc170) at /build/gcc-multilib/src/gcc/libbacktrace/fileline.c:136 fileline_fn = 0x0 failed = <optimized out> pass = <optimized out> called_error_callback = 0 descriptor = <optimized out> failed = <optimized out> #54 0x00007ffff730a432 in backtrace_pcinfo (state=0x7ffff7fa7000, pc=140737335789816, callback=0x7ffff6e805c0 <callback>, error_callback=0x7ffff6e80840 <error_callback>, data=0x7fffffffc170) at /build/gcc-multilib/src/gcc/libbacktrace/fileline.c:170 No locals. #55 0x00007ffff730a9f6 in unwind (context=<optimized out>, vdata=0x7fffffffc120) at /build/gcc-multilib/src/gcc/libbacktrace/backtrace.c:91 bdata = 0x7fffffffc120 pc = <optimized out> ip_before_insn = 0 #56 0x00007ffff57d2999 in _Unwind_Backtrace (trace=0x7ffff730a950 <unwind>, trace_argument=0x7fffffffc120) at /build/gcc-multilib/src/gcc/libgcc/unwind.inc:295 fs = { regs = { reg = {{ loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }, { loc = { reg = 18446744073709551600, offset = -16, exp = 0xfffffffffffffff0 <error: Cannot access memory at address 0xfffffffffffffff0> }, how = REG_SAVED_OFFSET }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED } <repeats 12 times>, { loc = { reg = 18446744073709551608, offset = -8, exp = 0xfffffffffffffff8 <error: Cannot access memory at address 0xfffffffffffffff8> }, how = REG_SAVED_OFFSET }, { loc = { reg = 0, offset = 0, exp = 0x0 }, how = REG_UNSAVED }}, prev = 0x0, cfa_offset = 48, cfa_reg = 7, cfa_exp = 0x0, cfa_how = CFA_REG_OFFSET }, pc = 0x7ffff6e80915 <runtime_callers+133>, personality = 0x0, data_align = -8, code_align = 1, retaddr_column = 16, fde_encoding = 27 '\033', lsda_encoding = 255 '\377', saw_z = 1 '\001', signal_frame = 0 '\000', eh_ptr = 0x0 } context = { reg = {0x0, 0x0, 0x0, 0x7fffffffc160, 0x0, 0x0, 0x7fffffffc110, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7fffffffc0f0, 0x7fffffffc0f8, 0x7fffffffc100, 0x7fffffffc108, 0x7fffffffc168, 0x0}, cfa = 0x7fffffffc170, ra = 0x7ffff6e808f9 <runtime_callers+105>, lsda = 0x0, bases = { tbase = 0x0, dbase = 0x0, func = 0x7ffff6e80890 <runtime_callers> }, flags = 4611686018427387904, version = 0, args_size = 0, by_value = '\000' <repeats 17 times> } code = _URC_NO_REASON #57 0x00007ffff730aa79 in backtrace_full (state=0x7ffff7fa7000, skip=skip@entry=0, callback=callback@entry=0x7ffff6e805c0 <callback>, error_callback=error_callback@entry=0x7ffff6e80840 <error_callback>, data=data@entry=0x7fffffffc170) at /build/gcc-multilib/src/gcc/libbacktrace/backtrace.c:127 bdata = { skip = 0, state = 0x7ffff7fa7000, callback = 0x7ffff6e805c0 <callback>, error_callback = 0x7ffff6e80840 <error_callback>, data = 0x7fffffffc170, ret = 0, can_alloc = 1 } p = <optimized out> #58 0x00007ffff6e808f9 in runtime_callers (skip=skip@entry=4, locbuf=locbuf@entry=0x7fffffffc200, m=m@entry=32, keep_thunks=keep_thunks@entry=false) at /build/gcc-multilib/src/gcc/libgo/runtime/go-callers.c:170 data = { locbuf = 0x7fffffffc200, skip = 5, index = 0, max = 32, keep_thunks = 0 } #59 0x00007ffff7279990 in runtime.callers (skip=4, locbuf=...) at /build/gcc-multilib/src/gcc/libgo/go/runtime/traceback_gccgo.go:63 n = <optimized out> $ret330 = 0 #60 runtime.mProf_Malloc (p=p@entry=0xc208000000, size=size@entry=2304) at /build/gcc-multilib/src/gcc/libgo/go/runtime/mprof.go:254 stk = {{ pc = 0, filename = 0x0 "", function = 0x0 "", lineno = 0 } <repeats 32 times>} b = 0x1 mp = <optimized out> #61 0x00007ffff6e8e591 in runtime_profilealloc (size=2304, v=0xc208000000) at /build/gcc-multilib/src/gcc/libgo/runtime/malloc.goc:308 rate = <optimized out> next = <optimized out> c = <optimized out> #62 runtime_mallocgc (size=2304, typ=<optimized out>, flag=0) at /build/gcc-multilib/src/gcc/libgo/runtime/malloc.goc:245 m = 0x7ffff7dcaae0 <runtime_m0> g = <optimized out> sizeclass = <optimized out> tinysize = <optimized out> size1 = <optimized out> rate = <optimized out> c = <optimized out> s = <optimized out> v = 0xc208000000 next = <optimized out> tiny = <optimized out> incallback = <optimized out> pmstats = <optimized out> #63 0x00007ffff6e81392 in __go_new (td=td@entry=0x7ffff7b686c0 <__go_tdn_runtime..runtime.g>, size=size@entry=2280) at /build/gcc-multilib/src/gcc/libgo/runtime/go-new.c:15 No locals. #64 0x00007ffff7261c70 in runtime.allocg () at /build/gcc-multilib/src/gcc/libgo/go/runtime/stubs.go:514 $ret294 = 0x0 #65 0x00007ffff6e8d0fc in runtime.malg (allocatestack=allocatestack@entry=true, signalstack=signalstack@entry=true, ret_stack=ret_stack@entry=0x7ffff7dcb288 <runtime_m0+1960>, ret_stacksize=ret_stacksize@entry=0x7ffff7dcb290 <runtime_m0+1968>) at /build/gcc-multilib/src/gcc/libgo/runtime/proc.c:1349 stacksize = <optimized out> newg = <optimized out> unused_stack = 0x7ffff7dcb288 <runtime_m0+1960> "" unused_stacksize = 1 dont_block_signals = 0 ss_stacksize = 1 #66 0x00007ffff726da2e in runtime.mpreinit (mp=0x7ffff7dcaae0 <runtime_m0>) at /build/gcc-multilib/src/gcc/libgo/go/runtime/os_gccgo.go:17 No locals. #67 runtime.mcommoninit (mp=mp@entry=0x7ffff7dcaae0 <runtime_m0>) at /build/gcc-multilib/src/gcc/libgo/go/runtime/proc.go:241 _g_ = <optimized out> #68 0x00007ffff6e8c6cb in runtime_schedinit () at /build/gcc-multilib/src/gcc/libgo/runtime/proc.c:490 m = 0x7ffff7dcaae0 <runtime_m0> n = <optimized out> procs = <optimized out> s = <optimized out> p = <optimized out> i = { _type = 0x7fffffffc920, data = 0x8 } #69 0x000000000040fc70 in main (argc=<optimized out>, argv=<optimized out>) at /build/gcc-multilib/src/gcc/libgo/runtime/go-main.c:56 No locals. #70 0x00007ffff5c17511 in __libc_start_main () from /usr/lib/libc.so.6 No symbol table info available. #71 0x000000000040fcca in _start () No symbol table info available. (gdb) Any idea what I'm doing wrong?