catchorg / catchorg/Catch2

g++ (macports) exception are not caught

Open
#1,353 1 comment 0 reactions 0 assignees View on GitHub
3rd party bug Possible bug
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

This probably started happening when I upgraded my OS and whatnot.

I have code that throws a `std::string` (or something inheriting from it) and a `REQUIRE_NOTHROW` gives this:

```
libc++abi.dylib: terminating with uncaught exception of type std::__cxx11::basic_string, std::allocator >

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unittest_indexstruct is a Catch v2.3.0 host application.
Run with -? for options

-------------------------------------------------------------------------------
indexed indexstruct
basic construction
construction and simplify
-------------------------------------------------------------------------------
unittest_indexstruct.cxx:281
...............................................................................

unittest_indexstruct.cxx:281: FAILED:
due to a fatal error condition:
SIGABRT - Abort (abnormal termination) signal

===============================================================================
test cases: 2 | 1 passed | 1 failed
assertions: 161 | 160 passed | 1 failed
```

Here's my g++:

```
[imp:371] g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin17/7.3.0/lto-wrapper
Target: x86_64-apple-darwin17
Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc7/gcc7/work/gcc-7.3.0/configure --prefix=/opt/local --build=x86_64-apple-darwin17 --enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc7 --includedir=/opt/local/include/gcc7 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-7 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-7 --with-gxx-include-dir=/opt/local/include/gcc7/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-tls --with-pkgversion='MacPorts gcc7 7.3.0_1'
Thread model: posix
gcc version 7.3.0 (MacPorts gcc7 7.3.0_1) ```

The same code is perfectly handled by the Intel compiler and gcc on another platform.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.