summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-08-02 10:48:41 +1000
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-08-02 10:48:41 +1000
commit81ed363cac52374e5f39b4f0906ebde9979d92a5 (patch)
tree74679d4f9f34e78c53e51bfc8d98dbaf04584569
parentd943d94a70e33037476b8ea5952728e163a5b814 (diff)
downloadmongo-81ed363cac52374e5f39b4f0906ebde9979d92a5.tar.gz
WT-2805 Avoid infinite recursion on error stream failure. (#2921)
Previously, if both a custom and the default error streams failed to write it caused infinite recursion.
-rw-r--r--src/support/err.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/support/err.c b/src/support/err.c
index 93c0af37328..60fc53cecd0 100644
--- a/src/support/err.c
+++ b/src/support/err.c
@@ -118,7 +118,13 @@ __handler_failure(WT_SESSION_IMPL *session,
handler->handle_error(handler, wt_session, error, s) == 0)
return;
+ /*
+ * In case there is a failure in the default error handler, make sure
+ * we don't recursively try to report *that* error.
+ */
+ session->event_handler = &__event_handler_default;
(void)__handle_error_default(NULL, wt_session, error, s);
+ session->event_handler = handler;
}
/*