Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Aug 2017 19:29:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 221423] gcc std::locale(LocaleName) crashes instead of throwing an exception
Message-ID:  <bug-221423-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221423

            Bug ID: 221423
           Summary: gcc std::locale(LocaleName) crashes instead of
                    throwing an exception
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: gerald@FreeBSD.org
          Reporter: artyomtnk@yahoo.com
          Assignee: gerald@FreeBSD.org
             Flags: maintainer-feedback?(gerald@FreeBSD.org)

This simple program crashes "Abort trap (core dumped)" when it either expec=
ted
to succeed or to catch an exception.


$ g++ -v
Using built-in specs.
COLLECT_GCC=3Dg++
COLLECT_LTO_WRAPPER=3D/usr/local/libexec/gcc5/gcc/x86_64-portbld-freebsd11.=
0/5.4.0/lto-wrapper
Target: x86_64-portbld-freebsd11.0
Configured with: /wrkdirs/usr/ports/lang/gcc5/work/gcc-5.4.0/configure
--with-build-config=3Dbootstrap-debug --disable-nls
--enable-gnu-indirect-function --libdir=3D/usr/local/lib/gcc5
--libexecdir=3D/usr/local/libexec/gcc5 --program-suffix=3D5
--with-as=3D/usr/local/bin/as --with-gmp=3D/usr/local
--with-gxx-include-dir=3D/usr/local/lib/gcc5/include/c++/
--with-ld=3D/usr/local/bin/ld --with-pkgversion=3D'FreeBSD Ports Collection'
--with-system-zlib --with-ecj-jar=3D/usr/local/share/java/ecj-4.5.jar
--enable-languages=3Dc,c++,objc,fortran,java --prefix=3D/usr/local
--localstatedir=3D/var --mandir=3D/usr/local/man --infodir=3D/usr/local/inf=
o/gcc5
--build=3Dx86_64-portbld-freebsd11.0
Thread model: posix
gcc version 5.4.0 (FreeBSD Ports Collection)=20

$ pkg info gcc
gcc-5.4.0_2
Name           : gcc
Version        : 5.4.0_2
Installed on   : Wed Aug  9 03:18:50 2017 IDT
Origin         : lang/gcc
Architecture   : FreeBSD:11:*
Prefix         : /usr/local
Categories     : lang java
Licenses       :=20
Maintainer     : gerald@FreeBSD.org
WWW            : http://gcc.gnu.org
Comment        : Meta-port for the default version of the GNU Compiler
Collection
Annotations    :
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 17.0B
Description    :
GCC, the GNU Compiler Collection, supports a number of languages.  This
port pulls in gcc5 (or another version-specific port) and defines symlinks
called gcc, g++, and gfortran.

WWW: http://gcc.gnu.org

Gerald Pfeifer <gerald@FreeBSD.org>

$ uname -a
FreeBSD freebsd11 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21
02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GEN=
ERIC
 amd64


//////////////////

Code:


////////////


#include <iostream>
#include <locale>

int main()
{
        try {
                std::locale l =3D std::locale("en_US.UTF-8");
        }
        catch(std::exception const &e) {
                std::cerr << e.what() << std::endl;
        }
        catch(...) {
                std::cerr << "Unknown exception " << std::endl;
        }
}

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221423-13>