From owner-freebsd-toolchain@freebsd.org Tue Mar 12 21:05:36 2019 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E827153E8ED for ; Tue, 12 Mar 2019 21:05:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-24.consmr.mail.ne1.yahoo.com (sonic310-24.consmr.mail.ne1.yahoo.com [66.163.186.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8393385D90 for ; Tue, 12 Mar 2019 21:05:34 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: w5gAGyUVM1nQGcRrwVvEuLZBhyi3RNXAoiES0GDqRulYmlj3NVWunsjlkug.y7I ISfSp51aqqIwhXCrsu1A0ZK_oMAGv8orp2HTd3hCkwbB6dPz68Sj2uk34zveA2HgvnB6hPObtUsH lcvC8BVnzXQCqaUAzeW4gJlaVFcySq0zd7hn_Zd9NMRFs1PYMAzsVtE3fp5UytkFBiuqKO.aSamc G_GpdFDNLCSCJYDJRj5ckWchqpKci05IB1KoBJaoFDvdkpcGaGvAIN.IYwnaLH8zJ6jXQfJAD488 Wb3buUIhZCebvD4NeYe3.j_Ii.oXE1SBzUB.3.2wQguQ6upEovYCmNopVPLmQJcIgSKlGNEtNSLJ n4LzlI0jZEszuDYgurn.JKMD7eoD6MKYa83fPki8pQ4Xqss8qr33EjkEqPNge6yYyIfETDSdhzuK tWzS5L8nAKDQDMYzIAY6Wpxcu9Mr6ZyJTUHxXITwjGe1hrDCByPW5OZcoyFdaRi9aCLUKU0waGaJ VpCIVjIxLtu5h.LekU9ImXiDSZkma88yIcKEEy_.o1VUjqI6PYmOK4Mm3X4y.AUUqRFzrJvZJQYo EuQRAdS5RFKmpb2karRGDXegHQH_evp3t5lgqD3PyWQsmFJ.SHEtPu.99e9ITnXTmmoPuAu1dJR9 zt6ejHItSTRmvBoPqUC9dEnCkrBNImSQBw6l.qPhGY8loeexlhqjTnlUNnA4sjmBlKq05yayQhbW pGbi7pF_Fo37W6ufHbW70CQSISWargucZmwjieDNReorjr0p6EwFk266VhcGIoVz9ZAATz0i5dah cu58qAb8DVSuTzs41WoZjC0ewGQJcDWnG_SHUZ.CkBEW0oo_Es_QUogJRjqKnjNteRImdLDCkhve 7w.1WSh9PCKAqqOQn.z1DKyv53Y7RUHuYl8vY7ukQv.8uOuJDKWC5cRXlAgHI_neqpJ9vg97MNlF pB6QU4LbrkA5T.yK0S_vMKnBi_JW6n8jmJ9p1Qs9gg8nT6bLYQONymNAu333f2FA1A1okosB9KHR qfm9SOUu5.ZdB6FeMFqolGMq3XaPuV1rJBfcDG_fmRM6nLLAMgMVujtB654gP0d17BCA- Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Tue, 12 Mar 2019 21:05:32 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.115]) ([67.170.167.181]) by smtp407.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 8cc80f3329a5ccc5ed505fabab741b5c; Tue, 12 Mar 2019 21:05:29 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: powerpc64 head -r345044: WITH_LLVM_LIBUNWIND= based buildworld leads to thrown C++ exceptions segmentation faulting Date: Tue, 12 Mar 2019 14:05:27 -0700 References: <36A485AF-E786-4BDB-8DD8-863BAB38D359@yahoo.com> To: FreeBSD PowerPC ML , FreeBSD Toolchain In-Reply-To: <36A485AF-E786-4BDB-8DD8-863BAB38D359@yahoo.com> Message-Id: X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 8393385D90 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.19 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.43)[-0.430,0]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-0.26)[ip: (-3.45), ipnet: 66.163.184.0/21(1.23), asn: 36646(0.98), country: US(-0.07)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[205.186.163.66.list.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 21:05:36 -0000 [I got some libunwind debug output from the a.out run. This and a disassembly of main suggest an instruction pointer address is too large by 0x4 for jumping to the code that would call __cxa_begin_catch .] > On 2019-Mar-12, at 12:20, Mark Millard wrote: >=20 > [I sometimes experiment with building powerpc64 (and 32-bit) via > more modern toolchains, here a amd64->powerpc64 cross build via > system-clang (so 8.0.0).] >=20 > buildworld with WITH_LLVM_LIBUNWIND=3D completes for powerpc64 > (but not 32-bit powerpc). However, for a system installed > from such for pwoerpc64, the following program (for example) > gets a segmentation fault: >=20 > # more ~/c_tests/exception_test.cpp=20 > #include >=20 > int main(void) > { > try { throw std::exception(); } > catch (std::exception& e) {} > return 0; > } >=20 > (Note: the same a.out works under a WITHOUT_LLVM_LIBUNWIND=3D > environment, that was patched for DW_CFA_remember_state and > DW_CFA_restore_state handling, with the system built via > devel/powerpc64-xtoolchain-gcc related materials. So the > failure is on the system library does of things for the > WITH_LLVM_LIBUNWIND=3D context.) >=20 > Unfortunately: >=20 > A) devel/gdb makes extensive use of thrown C++ exceptions > and so does not work for a powerpc64 system based on > WITH_LLVM_LIBUNWIND=3D . >=20 > B) The world built is not using dwarf-2 so /usr/libexec/gdb > is not handy/useful. >=20 > C) CFLAGS+=3D-gdwarf-2 leads to system-clang having an Abort > trap during buildworld's compile of gcrt1.s . (Reference > material later, below.) >=20 > D) lldb crashes in llvm_unreachable in > lldb::RegisterContextSP FreeBSDThread::GetRegisterContext() > on powerpc64. (Reference material later, below.) >=20 > So I've not managed to check the backtrace for the > segmentation fault in the short example. >=20 >=20 >=20 > For reference . . . >=20 >=20 > For (C) ( -gdwarf-2 use ): >=20 > QUOTES > (gdb) bt > #0 thr_kill () at thr_kill.S:3 > #1 0x000000000474afcf in __raise (s=3D6) at = /usr/src/lib/libc/gen/raise.c:52 > #2 0x00000000046cd386 in abort () at = /usr/src/lib/libc/stdlib/abort.c:79 > #3 0x00000000047394ba in __assert (func=3D, = file=3D, line=3D, failedexpr=3D) at /usr/src/lib/libc/gen/assert.c:51 > #4 0x000000000429aa9f in resetRootFile () at = /usr/src/contrib/llvm/include/llvm/MC/MCDwarf.h:316 > #5 parseDirectiveFile () at = /usr/src/contrib/llvm/lib/MC/MCParser/AsmParser.cpp:3377 > #6 parseStatement () at = /usr/src/contrib/llvm/lib/MC/MCParser/AsmParser.cpp:2023 > #7 0x000000000428cc12 in Run () at = /usr/src/contrib/llvm/lib/MC/MCParser/AsmParser.cpp:884 > #8 0x000000000163c649 in ExecuteAssembler () at = /usr/src/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp:503 > #9 cc1as_main () at = /usr/src/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp:589 > #10 0x0000000001643d10 in ExecuteCC1Tool () at = /usr/src/contrib/llvm/tools/clang/tools/driver/driver.cpp:312 > #11 main () at = /usr/src/contrib/llvm/tools/clang/tools/driver/driver.cpp:382 >=20 > void resetRootFile() { > assert(Header.MCDwarfFiles.empty()); > Header.RootFile.Name.clear(); > Header.resetMD5Usage(); > Header.HasSource =3D false; > } >=20 > --- lib/csu__L --- > cc: error: unable to execute command: Abort trap (core dumped) > cc: error: clang integrated assembler command failed due to signal = (use -v to see invocation) > FreeBSD clang version 8.0.0 (branches/release_80 355677) (based on = LLVM 8.0.0) > Target: powerpc64-unknown-freebsd13.0 > Thread model: posix > InstalledDir: /usr/bin > cc: note: diagnostic msg: PLEASE submit a bug report to = https://bugs.freebsd.org/submit/ and include the crash backtrace, = preprocessed source, and associated run script. > cc: note: diagnostic msg: Error generating preprocessed source(s) - no = preprocessable inputs. > *** [gcrt1.o] Error code 254 >=20 > make[5]: stopped in /usr/src/lib/csu/powerpc64 > .ERROR_TARGET=3D'gcrt1.o' > = .ERROR_META_FILE=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.power= pc64/usr/src/powerpc.powerpc64/lib/csu/powerpc64/gcrt1.o.meta' > .MAKE.LEVEL=3D'5' > MAKEFILE=3D'' > .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes= verbose' > _ERROR_CMD=3D'cc -gdwarf-2 -target powerpc64-unknown-freebsd13.0 = --sysroot=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr= /src/powerpc.powerpc64/tmp = -B/usr/local/powerpc64-unknown-freebsd13.0/bin/ -O2 -pipe = -I/usr/src/lib/csu/common -I/usr/src/lib/libc/include -mlongcall = -DCRT_IRELOC_SUPPRESS -std=3Dgnu99 -Wsystem-headers -Wall = -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual = -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align = -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls = -Wold-style-definition -Wno-pointer-sign -Wthread-safety -Wno-empty-body = -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c = -o gcrt1.o gcrt1.s;' > .CURDIR=3D'/usr/src/lib/csu/powerpc64' > .MAKE=3D'make' > = .OBJDIR=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/= src/powerpc.powerpc64/lib/csu/powerpc64' > .TARGETS=3D'all' > = DESTDIR=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/= src/powerpc.powerpc64/tmp' > LD_LIBRARY_PATH=3D'' > MACHINE=3D'powerpc' > MACHINE_ARCH=3D'powerpc64' > MAKEOBJDIRPREFIX=3D'' > MAKESYSPATH=3D'/usr/src/share/mk' > MAKE_VERSION=3D'20181221' > = PATH=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src= /powerpc.powerpc64/tmp/usr/sbin:/usr/obj/powerpc64vtsc_clang_altbinutils/p= owerpc.powerpc64/usr/src/powerpc.powerpc64/tmp/usr/bin:/usr/obj/powerpc64v= tsc_clang_altbinutils/powerpc.powerpc64/usr/src/powerpc.powerpc64/tmp/lega= cy/usr/sbin:/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr= /src/powerpc.powerpc64/tmp/legacy/usr/bin:/usr/obj/powerpc64vtsc_clang_alt= binutils/powerpc.powerpc64/usr/src/powerpc.powerpc64/tmp/legacy/bin::/sbin= :/bin:/usr/sbin:/usr/bin' > SRCTOP=3D'/usr/src' > = OBJTOP=3D'/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/s= rc/powerpc.powerpc64' > .MAKE.MAKEFILES=3D'/usr/src/share/mk/sys.mk = /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk = /root/src.configs/src.conf.powerpc64-clang_altbinutils-bootstrap.amd64-hos= t /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/src.sys.obj.mk = /usr/src/share/mk/auto.obj.mk /usr/src/share/mk/bsd.suffixes.mk = /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk = /usr/src/share/mk/src.sys.mk /dev/null = /usr/src/lib/csu/powerpc64/Makefile /usr/src/share/mk/bsd.lib.mk = /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk = /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk = /usr/src/share/mk/src.init.mk /usr/src/lib/csu/powerpc64/../Makefile.inc = /usr/src/share/mk/src.opts.mk /usr/src/share/mk/bsd.own.mk = /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk = /usr/src/lib/csu/powerpc64/../../Makefile.inc = /usr/src/share/mk/bsd.libnames.mk /usr/src/share/mk/src.libnames.mk = /usr/src/share/mk/bsd.symver.mk /usr/src/share/mk/bsd.nls.mk = /usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.files.mk = /usr/src/share/mk/bsd.dirs.mk /usr/src/share/mk/bsd.incs.mk = /usr/src/share/mk/bsd.links.mk /usr/src/share/mk/bsd.dep.mk = /usr/src/share/mk/bsd.clang-analyze.mk /usr/src/share/mk/bsd.obj.mk = /usr/src/share/mk/bsd.subdir.mk /usr/src/share/mk/bsd.sys.mk' > .PATH=3D'. /usr/src/lib/csu/powerpc64 /usr/src/lib/csu/common' > 1 error > END QUOTES >=20 >=20 > For (D) (lldb): >=20 > QUOTES > CPU not supported > UNREACHABLE executed at = /usr/src/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThr= ead.cpp:192! > Abort trap (core dumped) >=20 > (gdb) bt > #0 0x0000000813715208 in .__sys_thr_kill () at thr_kill.S:3 > #1 0x00000008137147cc in __raise (s=3D) at = /usr/src/lib/libc/gen/raise.c:52 > #2 0x000000081366b5d8 in abort () at = /usr/src/lib/libc/stdlib/abort.c:79 > #3 0x0000000011df6fb8 in llvm::llvm_unreachable_internal () at = /usr/src/contrib/llvm/lib/Support/ErrorHandling.cpp:222 > #4 0x00000000103aaaf8 in FreeBSDThread::GetRegisterContext () at = /usr/src/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThr= ead.cpp:192 > #5 0x00000000105807d4 in lldb_private::Thread::SetupForResume () at = /usr/src/contrib/llvm/tools/lldb/source/Target/Thread.cpp:613 > #6 0x0000000010571bc8 in lldb_private::ThreadList::WillResume () at = /usr/src/contrib/llvm/tools/lldb/source/Target/ThreadList.cpp:541 > #7 0x00000000105da23c in lldb_private::Process::PrivateResume () at = /usr/src/contrib/llvm/tools/lldb/source/Target/Process.cpp:3281 > #8 0x00000000105a00c8 in lldb_private::Target::Launch () at = /usr/src/contrib/llvm/tools/lldb/source/Target/Target.cpp:2922 > #9 0x000000001073f550 in CommandObjectProcessLaunch::DoExecute () at = /usr/src/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp:= 221 > #10 0x00000000106c36c4 in lldb_private::CommandObjectParsed::Execute = () at = /usr/src/contrib/llvm/tools/lldb/source/Interpreter/CommandObject.cpp:975 > #11 0x00000000106d8b44 in = lldb_private::CommandInterpreter::HandleCommand () at = /usr/src/contrib/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp= :1761 > #12 0x00000000106da0a0 in = lldb_private::CommandInterpreter::IOHandlerInputComplete () at = /usr/src/contrib/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp= :2801 > #13 0x00000000107c0a08 in lldb_private::IOHandlerEditline::Run () at = /usr/src/contrib/llvm/tools/lldb/source/Core/IOHandler.cpp:558 > #14 0x0000000010346e5c in lldb_private::Debugger::ExecuteIOHandlers () = at /usr/src/contrib/llvm/tools/lldb/source/Core/Debugger.cpp:988 > #15 0x00000000106c8ddc in = lldb_private::CommandInterpreter::RunCommandInterpreter () at = /usr/src/contrib/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp= :3003 > #16 0x000000001034feb4 in lldb::SBDebugger::RunCommandInterpreter () = at /usr/src/contrib/llvm/tools/lldb/source/API/SBDebugger.cpp:935 > #17 0x00000000101de878 in Driver::MainLoop () at = /usr/src/contrib/llvm/tools/lldb/tools/driver/Driver.cpp:756 > #18 0x00000000101a0088 in main () at = /usr/src/contrib/llvm/tools/lldb/tools/driver/Driver.cpp:936 >=20 > lldb::RegisterContextSP FreeBSDThread::GetRegisterContext() { > if (!m_reg_context_sp) { > m_posix_thread =3D nullptr; >=20 > RegisterInfoInterface *reg_interface =3D nullptr; > const ArchSpec &target_arch =3D = GetProcess()->GetTarget().GetArchitecture(); >=20 > switch (target_arch.GetMachine()) { > case llvm::Triple::aarch64: > reg_interface =3D new RegisterInfoPOSIX_arm64(target_arch); > break; > case llvm::Triple::arm: > reg_interface =3D new RegisterInfoPOSIX_arm(target_arch); > break; > case llvm::Triple::ppc: > #ifndef __powerpc64__ > reg_interface =3D new = RegisterContextFreeBSD_powerpc32(target_arch); > break; > #endif > case llvm::Triple::ppc64: > reg_interface =3D new = RegisterContextFreeBSD_powerpc64(target_arch); > break; > case llvm::Triple::mips64: > reg_interface =3D new RegisterContextFreeBSD_mips64(target_arch); > break; > case llvm::Triple::x86: > reg_interface =3D new RegisterContextFreeBSD_i386(target_arch); > break; > case llvm::Triple::x86_64: > reg_interface =3D new RegisterContextFreeBSD_x86_64(target_arch); > break; > default: > llvm_unreachable("CPU not supported"); > } > END QUOTES. I ran into libunwind having LIBUNWIND_PRINT_UNWINDING and LIBUNWIND_PRINT_APIS so I can report for the segmentation fault: # export LIBUNWIND_PRINT_UNWINDING=3D"" # export LIBUNWIND_PRINT_APIS=3D"" # ./a.out libunwind: _Unwind_RaiseException(ex_obj=3D0x810043060) libunwind: unw_init_local(cursor=3D0x3fffffffffffcb68, = context=3D0x3fffffffffffd100) libunwind: unw_step(cursor=3D0x3fffffffffffcb68) libunwind: unw_get_proc_info(cursor=3D0x3fffffffffffcb68, = &info=3D0x3fffffffffffd850) libunwind: unw_get_proc_name(cursor=3D0x3fffffffffffcb68, = &buf=3D0x3fffffffffffd648, bufLen=3D512) libunwind: unw_get_reg(cursor=3D0x3fffffffffffcb68, regNum=3D-1, = &value=3D0x3fffffffffffd638) libunwind: unwind_phase1(ex_ojb=3D0x810043060): pc=3D0x81019d954, = start_ip=3D0x81019d860, func=3D.anonymous., lsda=3D0x0, personality=3D0x0 libunwind: unw_step(cursor=3D0x3fffffffffffcb68) libunwind: unw_get_proc_info(cursor=3D0x3fffffffffffcb68, = &info=3D0x3fffffffffffd850) libunwind: unw_get_proc_name(cursor=3D0x3fffffffffffcb68, = &buf=3D0x3fffffffffffd648, bufLen=3D512) libunwind: unw_get_reg(cursor=3D0x3fffffffffffcb68, regNum=3D-1, = &value=3D0x3fffffffffffd638) libunwind: unwind_phase1(ex_ojb=3D0x810043060): pc=3D0x10000da8, = start_ip=3D0x10000d64, func=3D.anonymous., lsda=3D0x10000f84, = personality=3D0x8101b5360 libunwind: unwind_phase1(ex_ojb=3D0x810043060): calling personality = function 0x8101b5360 libunwind: unw_get_proc_info(cursor=3D0x3fffffffffffcb68, = &info=3D0x3fffffffffffc970) libunwind: _Unwind_GetLanguageSpecificData(context=3D0x3fffffffffffcb68) = =3D> 0x10000f84 libunwind: unw_get_proc_info(cursor=3D0x3fffffffffffcb68, = &info=3D0x3fffffffffffc8b0) libunwind: _Unwind_GetRegionStart(context=3D0x3fffffffffffcb68) =3D> = 0x10000d64 libunwind: unw_get_reg(cursor=3D0x3fffffffffffcb68, regNum=3D-1, = &value=3D0x3fffffffffffc8e8) libunwind: _Unwind_GetIP(context=3D0x3fffffffffffcb68) =3D> 0x10000da8 libunwind: unw_get_proc_info(cursor=3D0x3fffffffffffcb68, = &info=3D0x3fffffffffffc8a0) libunwind: _Unwind_GetRegionStart(context=3D0x3fffffffffffcb68) =3D> = 0x10000d64 libunwind: unw_get_reg(cursor=3D0x3fffffffffffcb68, regNum=3D-2, = &value=3D0x3fffffffffffd848) libunwind: unwind_phase1(ex_ojb=3D0x810043060): _URC_HANDLER_FOUND libunwind: unw_init_local(cursor=3D0x3fffffffffffcb68, = context=3D0x3fffffffffffd100) libunwind: unwind_phase2(ex_ojb=3D0x810043060) libunwind: unw_step(cursor=3D0x3fffffffffffcb68) libunwind: unw_get_reg(cursor=3D0x3fffffffffffcb68, regNum=3D-2, = &value=3D0x3fffffffffffca78) libunwind: unw_get_proc_info(cursor=3D0x3fffffffffffcb68, = &info=3D0x3fffffffffffca30) libunwind: unw_get_proc_name(cursor=3D0x3fffffffffffcb68, = &buf=3D0x3fffffffffffc830, bufLen=3D512) libunwind: unwind_phase2(ex_ojb=3D0x810043060): start_ip=3D0x81019d860, = func=3D.anonymous., sp=3D0x3fffffffffffd900, lsda=3D0x0, personality=3D0x0= libunwind: unw_step(cursor=3D0x3fffffffffffcb68) libunwind: unw_get_reg(cursor=3D0x3fffffffffffcb68, regNum=3D-2, = &value=3D0x3fffffffffffca78) libunwind: unw_get_proc_info(cursor=3D0x3fffffffffffcb68, = &info=3D0x3fffffffffffca30) libunwind: unw_get_proc_name(cursor=3D0x3fffffffffffcb68, = &buf=3D0x3fffffffffffc830, bufLen=3D512) libunwind: unwind_phase2(ex_ojb=3D0x810043060): start_ip=3D0x10000d64, = func=3D.anonymous., sp=3D0x3fffffffffffd9a0, lsda=3D0x10000f84, = personality=3D0x8101b5360 libunwind: unw_get_proc_info(cursor=3D0x3fffffffffffcb68, = &info=3D0x3fffffffffffc630) libunwind: _Unwind_GetLanguageSpecificData(context=3D0x3fffffffffffcb68) = =3D> 0x10000f84 libunwind: _Unwind_SetIP(context=3D0x3fffffffffffcb68, value=3D0x10000dac)= libunwind: unw_set_reg(cursor=3D0x3fffffffffffcb68, regNum=3D-1, = value=3D0x10000dac) libunwind: _Unwind_SetGR(context=3D0x3fffffffffffcb68, reg=3D3, = value=3D0x810043060) libunwind: unw_set_reg(cursor=3D0x3fffffffffffcb68, regNum=3D3, = value=3D0x810043060) libunwind: _Unwind_SetGR(context=3D0x3fffffffffffcb68, reg=3D4, = value=3D0x1) libunwind: unw_set_reg(cursor=3D0x3fffffffffffcb68, regNum=3D4, = value=3D0x1) libunwind: unwind_phase2(ex_ojb=3D0x810043060): _URC_INSTALL_CONTEXT libunwind: unw_get_reg(cursor=3D0x3fffffffffffcb68, regNum=3D-1, = &value=3D0x3fffffffffffc830) libunwind: unw_get_reg(cursor=3D0x3fffffffffffcb68, regNum=3D-2, = &value=3D0x3fffffffffffca78) libunwind: unwind_phase2(ex_ojb=3D0x810043060): re-entering user code = with ip=3D0x10000dac, sp=3D0x3fffffffffffd9a0 libunwind: unw_resume(cursor=3D0x3fffffffffffcb68) Segmentation fault (core dumped) Note that the 0x10000dac address below is after the "ld r2,40(r1)" that sets up r2's value for use in the 00000018.plt_call.__cxa_begin_catch@@CXXABI_1.3 routine. The ip value reported by unwind_phase2 appears to too large by 0x4 . (gdb) disass main Dump of assembler code for function main(): 0x0000000010000d64 <+0>: mflr r0 0x0000000010000d68 <+4>: std r31,-8(r1) 0x0000000010000d6c <+8>: std r0,16(r1) 0x0000000010000d70 <+12>: stdu r1,-128(r1) 0x0000000010000d74 <+16>: mr r31,r1 0x0000000010000d78 <+20>: li r3,8 0x0000000010000d7c <+24>: bl 0x100007a0 = <00000018.plt_call.__cxa_allocate_exception@@CXXABI_1.3> 0x0000000010000d80 <+28>: ld r2,40(r1) 0x0000000010000d84 <+32>: nop 0x0000000010000d88 <+36>: ld r4,-32728(r2) 0x0000000010000d8c <+40>: addi r4,r4,16 0x0000000010000d90 <+44>: std r4,0(r3) 0x0000000010000d94 <+48>: nop 0x0000000010000d98 <+52>: nop 0x0000000010000d9c <+56>: ld r4,-32720(r2) 0x0000000010000da0 <+60>: ld r5,-32712(r2) 0x0000000010000da4 <+64>: bl 0x10000800 = <00000018.plt_call.__cxa_throw@@CXXABI_1.3> 0x0000000010000da8 <+68>: ld r2,40(r1) 0x0000000010000dac <+72>: bl 0x100007c0 = <00000018.plt_call.__cxa_begin_catch@@CXXABI_1.3> 0x0000000010000db0 <+76>: ld r2,40(r1) 0x0000000010000db4 <+80>: bl 0x100007e0 = <00000018.plt_call.__cxa_end_catch@@CXXABI_1.3> 0x0000000010000db8 <+84>: ld r2,40(r1) 0x0000000010000dbc <+88>: li r3,0 0x0000000010000dc0 <+92>: addi r1,r1,128 0x0000000010000dc4 <+96>: ld r0,16(r1) 0x0000000010000dc8 <+100>: ld r31,-8(r1) 0x0000000010000dcc <+104>: mtlr r0 0x0000000010000dd0 <+108>: blr 0x0000000010000dd4 <+112>: .long 0x0 0x0000000010000dd8 <+116>: .long 0x0 0x0000000010000ddc <+120>: .long 0x0 End of assembler dump. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)