From owner-freebsd-toolchain@freebsd.org Tue Aug 15 19:09:45 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 6BA89DC2221 for ; Tue, 15 Aug 2017 19:09:45 +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 58D087F982 for ; Tue, 15 Aug 2017 19:09:45 +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 v7FJ9iDm029547 for ; Tue, 15 Aug 2017 19:09:45 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 221423] gcc std::locale(LocaleName) crashes instead of throwing an exception Date: Tue, 15 Aug 2017 19:09:45 +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 Many People 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, 15 Aug 2017 19:09:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221423 --- Comment #6 from Mark Millard --- (In reply to Jan Beich from comment #5) >(In reply to Mark Millard from comment #3) >> mix of system and gcc libraries than gcc5 > >Tier1 and some Tier2 archs don't have system GCC anymore. It's enough to i= nstall more >than one lang/gcc* to get ambiguity about libstdc++ et al. There are still system libraries that are ambiguously bound to when the system has no gcc of its own. Use of: -Wl,-rpath=3D/usr/local/lib/gcc for the appropriate prevents that. For example: libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x800fbd000) vs. libgcc_s.so.1 =3D> /usr/local/lib/gcc6/libgcc_s.so.1 (0x800e06000) But there is also the lack of: libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x800b72000) when -Wl,-rpath=3D/usr/local/lib/gcc is used. This can interact badly with binding to: libthr.so.3 =3D> /lib/libthr.so.3 (0x8011d3000) since libthr was built based on the context for: libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x800b72000) and not the implicit material in libstdc++. See bugzilla 221423. For reference: g++6 -std=3Dc++14 -Wpedantic -Wall -pthread -Wl,-rpath=3D/usr/local/lib/gcc= 6 -O2 cpp_clocks_investigation.cpp # ldd a.out a.out: libstdc++.so.6 =3D> /usr/local/lib/gcc6/libstdc++.so.6 (0x800844000) libm.so.5 =3D> /lib/libm.so.5 (0x800bd9000) libgcc_s.so.1 =3D> /usr/local/lib/gcc6/libgcc_s.so.1 (0x800e06000) libthr.so.3 =3D> /lib/libthr.so.3 (0x80101d000) libc.so.7 =3D> /lib/libc.so.7 (0x801245000) and the result has crash problems from the odd mix of libstdc++ supplying what would be used from libcxxrt inlibthr. (FYI: cpp_clocks_investigation.cpp is pure standard C++ code.) (I did not notice libthr using libgcc_s but if it did then it is the same sort of problem as for libstdc++ providing when the system libcxxrt would provide.) By contrast: clang++ -std=3Dc++14 -Wpedantic -Wall -pthread cpp_clocks_investigation.cpp= =20 # ldd a.out a.out: libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x8008a6000) libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x800b72000) libm.so.5 =3D> /lib/libm.so.5 (0x800d90000) libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x800fbd000) libthr.so.3 =3D> /lib/libthr.so.3 (0x8011d3000) libc.so.7 =3D> /lib/libc.so.7 (0x8013fb000) works fine and libthr has libcxxrt to bind to (and the system libgcc_s if libthr has any binding to there). Separately from the above: -Wl,-rpath=3D/usr/local/lib/gcc also disambiguates when having multiple lang/gcc* 's installed. But this type of context is not required for there to be binding problems. --=20 You are receiving this mail because: You are the assignee for the bug.=