From owner-freebsd-ppc@freebsd.org Sun Oct 8 03:33:09 2017 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3DCEE248F0 for ; Sun, 8 Oct 2017 03:33:09 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-18.reflexion.net [208.70.210.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1583A68A81 for ; Sun, 8 Oct 2017 03:33:08 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 631 invoked from network); 8 Oct 2017 03:33:07 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 8 Oct 2017 03:33:07 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.3) with SMTP; Sat, 07 Oct 2017 23:33:07 -0400 (EDT) Received: (qmail 8290 invoked from network); 8 Oct 2017 03:33:06 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 8 Oct 2017 03:33:06 -0000 Received: from [192.168.1.26] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 1EAF3EC8559; Sat, 7 Oct 2017 20:33:06 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: C++ in jemalloc Date: Sat, 7 Oct 2017 20:33:05 -0700 References: <528ED3CD-8A4B-4F00-8728-7D231DB0811A@dsl-only.net> <20171007064249.GA73770@vlakno.cz> <934C1C1A-1303-4A8C-9E80-4259E475220A@dsl-only.net> <20171007102151.GA84155@vlakno.cz> To: FreeBSD Toolchain , FreeBSD PowerPC ML , FreeBSD Current In-Reply-To: Message-Id: <6B5AB934-1F8F-49F0-90F6-C4F9C48787E6@dsl-only.net> X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Oct 2017 03:33:09 -0000 It turns out that /usr/local/bin/gdb crashing=20 for the clang-built powerpc64 world is again due to C++ exceptions being thrown, this time in gdb80 itself. This helps explain why for clang-based buildworld experiments /usr/libexec/gdb is a better alternative currently for the powerpc families. Again the _Unwind_SetGR use in __gxx_personality_v0 fails: # ls -lT /usr/local/bin/gdb* lrwxr-xr-x 1 root wheel 5 Sep 29 15:25:15 2017 = /usr/local/bin/gdb -> gdb80 -r-xr-xr-x 1 root wheel 97577168 Sep 29 15:25:15 2017 = /usr/local/bin/gdb80 lrwxr-xr-x 1 root wheel 5 Sep 29 15:25:15 2017 = /usr/local/bin/gdbtui80 -> gdb80 # ldd /usr/local/bin/gdb80=20 /usr/local/bin/gdb80: libreadline.so.7 =3D> /usr/local/lib/libreadline.so.7 = (0x50e80000) libncurses.so.8 =3D> /lib/libncurses.so.8 (0x50ef7000) libkvm.so.7 =3D> /lib/libkvm.so.7 (0x50f61000) libutil.so.9 =3D> /lib/libutil.so.9 (0x50f83000) libm.so.5 =3D> /lib/libm.so.5 (0x50fad000) libexpat.so.1 =3D> /usr/local/lib/libexpat.so.1 (0x50fe5000) liblzma.so.5 =3D> /usr/lib/liblzma.so.5 (0x5102a000) libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x5105d000) libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x5118a000) libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x511b1000) libc.so.7 =3D> /lib/libc.so.7 (0x511d6000) libncursesw.so.8 =3D> /lib/libncursesw.so.8 (0x51528000) libelf.so.2 =3D> /lib/libelf.so.2 (0x515ac000) libthr.so.3 =3D> /lib/libthr.so.3 (0x515da000) # /usr/libexec/gdb /usr/local/bin/gdb80 /var/crash/gdb80.14502.core=20 . . . Core was generated by `/usr/local/bin/gdb = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/s'. Program terminated with signal 11, Segmentation fault. . . . (gdb) bt #0 0x00000000511b5c20 in _Unwind_SetGR (context=3D, index=3D, val=3D1374378080) at = unwind-dw2-fde.h:162 #1 0x000000005119f194 in __gxx_personality_v0 (version=3D, actions=3D, exceptionClass=3D, exceptionObject=3D0x51eb5860,=20 context=3D0xffffffffffffb420) at = /usr/src/contrib/libcxxrt/exception.cc:1203 #2 0x00000000511b6a60 in _Unwind_RaiseException_Phase2 (exc=3D0x51eb5860,= context=3D0xffffffffffffb420) at unwind.inc:66 #3 0x00000000511b6548 in _Unwind_RaiseException (exc=3D) at unwind.inc:135 #4 0x000000005119e4f4 in __cxa_throw (thrown_exception=3D, tinfo=3D, dest=3D) at /usr/src/contrib/libcxxrt/exception.cc:774 #5 0x00000000102be040 in throw_exception () at common-exceptions.c:303 #6 0x00000000102be1dc in throw_it (reason=3D1374378080, = error=3D4294947872, fmt=3D, ap=3D) at common-exceptions.c:373 #7 0x00000000102be0a4 in throw_verror (error=3D, = fmt=3D, ap=3D) at = common-exceptions.c:379 #8 0x00000000102be258 in throw_error (error=3DGDB_NO_ERROR, fmt=3D0x18 =
) at common-exceptions.c:394 #9 0x0000000010279bf8 in call_site_for_pc (gdbarch=3D, pc=3D) at block.c:241 #10 0x00000000102e93e0 in call_site_find_chain (gdbarch=3D, caller_pc=3D, callee_pc=3D) at dwarf2loc.c:1057 #11 0x00000000102e4800 in dwarf2_tailcall_sniffer_first = (this_frame=3D0x51eb5808, tailcall_cachep=3D0x51eb5860, = entry_cfa_sp_offsetp=3D0xffffffffffffb420) at = dwarf2-frame-tailcall.c:387 #12 0x00000000102e32b8 in = ._ZL26dwarf2_frame_prev_registerP10frame_infoPPvi () at = __split_buffer:311 #13 0x0000000010340464 in frame_unwind_register_value (frame=3D, regnum=3D) at frame.c:1200 #14 0x0000000010340148 in frame_register_unwind (frame=3D0x0, = regnum=3D, optimizedp=3D0x51eb5860, = unavailablep=3D0x51eb5808, lvalp=3D0x514077a0, addrp=3D0x51eb5808, = realnump=3D0x6,=20 bufferp=3D0xffffffffffffb420 "") at frame.c:1102 #15 0x0000000010341ddc in get_prev_frame_always_1 = (this_frame=3D0xffffffffffffb420) at frame.c:1840 #16 0x000000001033e878 in get_prev_frame_always = (this_frame=3D0xffffffffffffb420) at frame.c:2092 #17 0x000000001033e110 in get_prev_frame (this_frame=3D0xffffffffffffb420)= at frame.c:2345 #18 0x0000000010419464 in backtrace_command (arg=3D, from_tty=3D1374378080) at stack.c:1830 #19 0x00000000101e3654 in do_cfunc (c=3D, args=3D0x0,= from_tty=3D24) at cli/cli-decode.c:106 #20 0x00000000101e67b0 in cmd_func (cmd=3D0x0, args=3D0x18
, from_tty=3D) at = cli/cli-decode.c:1896 #21 0x000000001046497c in execute_command (p=3D, = from_tty=3D1374377992) at top.c:674 #22 0x000000001032e398 in command_handler (command=3D0xffffffffffffb420 = "") at event-top.c:590 #23 0x000000001032e788 in command_line_handler (rl=3D) at event-top.c:780 #24 0x000000001032dc54 in gdb_rl_callback_handler (rl=3D) at event-top.c:213 #25 0x0000000050ec5950 in rl_callback_read_char () at ../callback.c:283 #26 0x000000001032f560 in gdb_rl_callback_read_char_wrapper_noexcept () = at event-top.c:175 #27 0x000000001032d84c in gdb_rl_callback_read_char_wrapper = (client_data=3D) at event-top.c:192 #28 0x000000001032e14c in stdin_event_handler (error=3D, client_data=3D0xffffffffffffb420) at event-top.c:518 #29 0x000000001032d690 in handle_file_event = (file_ptr=3D0xffffffffffffb420, ready_mask=3D1374378080) at = event-loop.c:733 #30 0x000000001032c830 in gdb_wait_for_event (block=3D) at common-exceptions.h:220 #31 0x000000001032c2c4 in gdb_do_one_event () at event-loop.c:347 #32 0x000000001032c940 in start_event_loop () at event-loop.c:371 #33 0x00000000103a674c in captured_command_loop (data=3D) at main.c:325 #34 0x000000001032fd50 in catch_errors (func=3D, = func_args=3D0x6, errstring=3D0xffffffffffffb420 "", mask=3D1374377992) = at exceptions.c:236 #35 0x00000000103a61b4 in gdb_main (args=3D) at = main.c:1150 #36 0x000000001000bc38 in main (argc=3D, = argv=3D0xffffffffffffb420) at gdb.c:38 #37 0x000000001000b938 in _start (argc=3D1374377992, argv=3D0x51eb5860, = env=3D0xffffffffffffb420, obj=3D, cleanup=3D, ps_strings=3D) at /usr/src/lib/csu/powerpc64/crt1.c:94 #38 0x0000000050e49b70 in .text () at = /usr/src/libexec/rtld-elf/powerpc64/rtld_start.S:104 Current language: auto; currently minimal =3D=3D=3D Mark Millard markmi at dsl-only.net