Install the bad-alloc handler before fatal errors
The bad-alloc installer was incorrectly asserting that the other handler isn't set yet, instead of checking its own, but we can avoid that by changing the order we install them. Ref: https://github.com/llvm/llvm-project/issues/83040
This commit is contained in:
parent
adf57a75d5
commit
8d374b1f2a
1 changed files with 1 additions and 1 deletions
|
@ -110,8 +110,8 @@ static void BadAllocErrorHandler(void *UserData,
|
|||
}
|
||||
|
||||
extern "C" void LLVMRustInstallErrorHandlers() {
|
||||
install_fatal_error_handler(FatalErrorHandler);
|
||||
install_bad_alloc_error_handler(BadAllocErrorHandler);
|
||||
install_fatal_error_handler(FatalErrorHandler);
|
||||
install_out_of_memory_new_handler();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue