File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -392,6 +392,9 @@ TEST_CASE("Exception handling" * doctest::test_suite("basic_tasks"))
392392 // Verify that stack traces contain demangled function names from the
393393 // known call chains. These functions have external linkage and are
394394 // exported to the dynamic symbol table via -rdynamic in Debug builds.
395+ // In Release builds, -rdynamic is not set and functions may be inlined,
396+ // so we skip name-based assertions there.
397+ #ifndef NDEBUG
395398 // Note: very small leaf functions (e.g. level_3_throws_int, which is
396399 // just `throw 42;`) may be inlined by the compiler, so we only assert
397400 // on the caller frames that reliably appear.
@@ -404,6 +407,7 @@ TEST_CASE("Exception handling" * doctest::test_suite("basic_tasks"))
404407 // ThrowsUnknown call chain
405408 REQUIRE (logger_ptr->contains (" level_2_calls_level_3_int" ));
406409 REQUIRE (logger_ptr->contains (" level_1_calls_level_2_int" ));
410+ #endif
407411
408412 // Clean up: remove the capturing logger
409413 auto & loggers = ccf::logger::config::loggers ();
You can’t perform that action at this time.
0 commit comments