From owner-freebsd-toolchain@freebsd.org Tue Aug 8 22:11:58 2017 Return-Path: Delivered-To: freebsd-toolchain@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 1F5C3DD3B37 for ; Tue, 8 Aug 2017 22:11:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 0A7B075F3B for ; Tue, 8 Aug 2017 22:11:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v78MBvaZ022129 for ; Tue, 8 Aug 2017 22:11:57 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 221288] lang/gcc5 links against libsupc++ when compiling Date: Tue, 08 Aug 2017 22:11:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 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, 08 Aug 2017 22:11:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221288 --- Comment #9 from Mark Millard --- (In reply to Mark Millard from comment #6) Returning to a g++6 based a.out back trace=20 for the C++ threading to show some infrastructure usage involved: Thread 12 received signal SIGSEGV, Segmentation fault. [Switching to LWP 100277 of process 18243] uw_frame_state_for (context=3Dcontext@entry=3D0x7fffdfbfbe20, fs=3Dfs@entry=3D0x7fffdfbfbb70) at /usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.4.0/libgcc/unwind-dw2.c:1= 249 1249 return MD_FALLBACK_FRAME_STATE_FOR (context, fs); (gdb) disass Dump of assembler code for function uw_frame_state_for: . . . 0x0000000800e14a6e <+94>: callq 0x800e08870 <_Unwind_Find_FDE@plt> 0x0000000800e14a73 <+99>: test %rax,%rax 0x0000000800e14a76 <+102>: mov %rax,%r12 0x0000000800e14a79 <+105>: je 0x800e14bd8 . . . 0x0000000800e14bd8 <+456>: mov 0x98(%r15),%rax =3D> 0x0000000800e14bdf <+463>: cmpl $0x247c8d48,(%rax) 0x0000000800e14be5 <+469>: je 0x800e14e62 0x0000000800e14beb <+475>: nopl 0x0(%rax,%rax,1) 0x0000000800e14bf0 <+480>: mov $0x5,%eax 0x0000000800e14bf5 <+485>: add $0x38,%rsp 0x0000000800e14bf9 <+489>: pop %rbx 0x0000000800e14bfa <+490>: pop %rbp 0x0000000800e14bfb <+491>: pop %r12 0x0000000800e14bfd <+493>: pop %r13 0x0000000800e14bff <+495>: pop %r14 0x0000000800e14c01 <+497>: pop %r15 0x0000000800e14c03 <+499>: retq=20=20=20 . . . which matches up with the 0x247c8d48 comparison code in: /usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.4.0/libgcc/config/i386/fr= eebsd-unwind.h in the source: . . . #ifdef __x86_64__ #define MD_FALLBACK_FRAME_STATE_FOR x86_64_freebsd_fallback_frame_state static _Unwind_Reason_Code x86_64_freebsd_fallback_frame_state (struct _Unwind_Context *context, _Unwind_FrameState *fs) { struct sigframe *sf; long new_cfa; /* Prior to FreeBSD 9, the signal trampoline was located immediately before the ps_strings. To support non-executable stacks on AMD64, the sigtramp was moved to a shared page for FreeBSD 9. Unfortunately this means looking frame patterns again (sys/amd64/amd64/sigtramp.S) rather than using the robust and convenient KERN_PS_STRINGS trick. : lea 0x10(%rsp),%rdi : pushq $0x0 : mov $0x1a1,%rax : syscall If we can't find this pattern, we're at the end of the stack. */ if (!( *(unsigned int *)(context->ra) =3D=3D 0x247c8d48 && *(unsigned int *)(context->ra + 4) =3D=3D 0x48006a10 && *(unsigned int *)(context->ra + 8) =3D=3D 0x01a1c0c7 && *(unsigned int *)(context->ra + 12) =3D=3D 0x050f0000 )) return _URC_END_OF_STACK; . . . where: (gdb) print context->ra $2 =3D (void *) 0x7fffdf7fb000 (gdb) print *(unsigned*)(context->ra) Cannot access memory at address 0x7fffdf7fb000 --=20 You are receiving this mail because: You are the assignee for the bug.=