[llvm] Fix crash in install_bad_alloc_error_handler (PR #83160)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 05:41:51 PST 2024
================
@@ -1132,4 +1132,26 @@ TEST(Error, moveInto) {
}
}
+TEST(Error, FatalBadAllocErrorHandlersInteraction) {
+ auto ErrorHandler = [](void *Data, const char *, bool) {};
+ install_fatal_error_handler(ErrorHandler, nullptr);
+ // The following call should not crash
+ install_bad_alloc_error_handler(ErrorHandler, nullptr);
+
+ // Don't interfere with other tests:
----------------
aganea wrote:
Remove `:` and finish with a full stop (`.`)
https://github.com/llvm/llvm-project/pull/83160
More information about the llvm-commits
mailing list