A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
Describe the bug
When Catch2 catches an exception thrown by test code in Clang 19.1 (at least the version I have installed using homebrew on my Mac), it results in a Bus error: 10. This occurs regardless of whether or not the exception is raised inside a REQUIRE macro, so long as the exception is caught by Catch2. (If I set up a try block to catch the exception myself before any Catch2 code sees it, it doesn't seem to cause a problem.)
Expected behavior
Catch2 should catch the exception and produce some kind of reasonable output. If in a REQUIRE_THROWS macro where an appropriate exception is raised, the test should pass.
Reproduction steps
This test file was enough to trigger the problem for me:
I should note that I'm not positive whether this is really a Catch2 error, or an issue with the particular Clang installation I have. It would be nice to know if anyone else can reproduce the issue.
Describe the bug When Catch2 catches an exception thrown by test code in Clang 19.1 (at least the version I have installed using homebrew on my Mac), it results in a
Bus error: 10
. This occurs regardless of whether or not the exception is raised inside aREQUIRE
macro, so long as the exception is caught by Catch2. (If I set up a try block to catch the exception myself before any Catch2 code sees it, it doesn't seem to cause a problem.)Expected behavior Catch2 should catch the exception and produce some kind of reasonable output. If in a
REQUIRE_THROWS
macro where an appropriate exception is raised, the test should pass.Reproduction steps This test file was enough to trigger the problem for me:
I typically get output like this:
Platform information: