diff --git a/folly/Executor.h b/folly/Executor.h index fc8e9321fc1..c5104b370fa 100644 --- a/folly/Executor.h +++ b/folly/Executor.h @@ -341,7 +341,11 @@ class Executor { template FOLLY_ERASE static void invokeCatchingExns(char const* p, F f) noexcept { +#if 0 catch_exception(f, invokeCatchingExnsLog, p); +#else + f(); +#endif } protected: diff --git a/folly/executors/test/SerialExecutorTest.cpp b/folly/executors/test/SerialExecutorTest.cpp index 121fa80c2b7..7a1e04a3819 100644 --- a/folly/executors/test/SerialExecutorTest.cpp +++ b/folly/executors/test/SerialExecutorTest.cpp @@ -192,7 +192,10 @@ TYPED_TEST(SerialExecutorTest, RecursiveAddInline) { recursiveAddTest(folly::InlineExecutor::instance()); } -TYPED_TEST(SerialExecutorTest, ExecutionThrows) { +// MB-44253: Disabled - unhandled exceptions in tasks are no longer caught +// (invokeCatchingExns is a no-op on this branch), so this test would +// std::terminate. +TYPED_TEST(SerialExecutorTest, DISABLED_ExecutionThrows) { auto executor = TypeParam::create(); // an empty Func will throw std::bad_function_call when invoked, diff --git a/folly/executors/test/ThreadedExecutorTest.cpp b/folly/executors/test/ThreadedExecutorTest.cpp index 5aefa9b4e4e..4aa69827a13 100644 --- a/folly/executors/test/ThreadedExecutorTest.cpp +++ b/folly/executors/test/ThreadedExecutorTest.cpp @@ -39,7 +39,10 @@ TEST_F(ThreadedExecutorTest, example) { EXPECT_EQ("42", ret); } -TEST_F(ThreadedExecutorTest, exception) { +// MB-44253: Disabled - unhandled exceptions in tasks are no longer caught +// (invokeCatchingExns is a no-op on this branch), so this test would +// std::terminate. +TEST_F(ThreadedExecutorTest, DISABLED_exception) { folly::ThreadedExecutor x; x.add([] { throw std::runtime_error("This should not crash the program"); }); }