From 3fe05233e2a11fb4e0ed156c1a52526d17ba6346 Mon Sep 17 00:00:00 2001 From: Alexander Shabalin Date: Wed, 29 Dec 2021 12:58:35 +0000 Subject: [PATCH] [K/N] Fix set_terminate usage in ExceptionsTest.cpp Merge-request: KT-MR-5376 Merged-by: Alexander Shabalin --- kotlin-native/runtime/src/main/cpp/ExceptionsTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kotlin-native/runtime/src/main/cpp/ExceptionsTest.cpp b/kotlin-native/runtime/src/main/cpp/ExceptionsTest.cpp index b6559a4a02f..044231252ce 100644 --- a/kotlin-native/runtime/src/main/cpp/ExceptionsTest.cpp +++ b/kotlin-native/runtime/src/main/cpp/ExceptionsTest.cpp @@ -162,6 +162,7 @@ TEST(ExceptionDeathTest, TerminateHandler_WithHook) { konan::consoleErrorf("Unknown Exception\n"); } } + std::abort(); }); // The termination handler will check the initialization of the whole runtime, so we cannot use RunInNewThread here. // This call also sets the K/N termination handler. @@ -203,6 +204,7 @@ TEST(ExceptionDeathTest, TerminateHandler_NoHook) { konan::consoleErrorf("Unknown Exception\n"); } } + std::abort(); }); // The termination handler will check the initialization of the whole runtime, so we cannot use RunInNewThread here. // This call also sets the K/N termination handler. @@ -246,6 +248,7 @@ TEST(ExceptionDeathTest, TerminateHandler_WithFailingHook) { konan::consoleErrorf("Unknown Exception\n"); } } + std::abort(); }); // The termination handler will check the initialization of the whole runtime, so we cannot use RunInNewThread here. // This call also sets the K/N termination handler. @@ -283,6 +286,7 @@ TEST(ExceptionDeathTest, TerminateHandler_IgnoreHooks) { konan::consoleErrorf("Unknown Exception\n"); } } + std::abort(); }); SetKonanTerminateHandler(); try { @@ -526,4 +530,4 @@ TEST(TerminationThreadStateDeathTest, TerminationInForeignExceptionCatch) { }; EXPECT_DEATH(testBlock(), AllOf(ASSERTS_PASSED, NATIVE_HANDLER_RAN, Not(KOTLIN_HANDLER_RAN))); -} \ No newline at end of file +}