aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-08-16 12:55:24 -0700
committerAlexander Blair <snipa@jagtech.io>2020-08-16 12:55:25 -0700
commitd73b1b6560a51a052b796f4dcd4e6778ef285d1f (patch)
tree01116d96637d76a8bf562c786b96a63642d63ec7 /external
parentMerge pull request #6722 (diff)
parentrpc: reject wrong sized txid (diff)
downloadmonero-d73b1b6560a51a052b796f4dcd4e6778ef285d1f.tar.xz
Merge pull request #6727
13eee1d6a rpc: reject wrong sized txid (moneromooo-monero) 92e6b7df2 easylogging++: fix crash with reentrant logging (moneromooo-monero) 6dd95d530 epee: guard against exceptions in RPC handlers (moneromooo-monero) 90016ad74 blockchain: guard against exceptions in add_new_block/children (moneromooo-monero)
Diffstat (limited to 'external')
-rw-r--r--external/easylogging++/easylogging++.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc
index 0d748c225..bf877c018 100644
--- a/external/easylogging++/easylogging++.cc
+++ b/external/easylogging++/easylogging++.cc
@@ -2968,6 +2968,16 @@ void Writer::initializeLogger(Logger *logger, bool needLock) {
}
void Writer::processDispatch() {
+ static std::atomic_flag in_dispatch;
+ if (in_dispatch.test_and_set())
+ {
+ if (m_proceed && m_logger != NULL)
+ {
+ m_logger->stream().str(ELPP_LITERAL(""));
+ m_logger->releaseLock();
+ }
+ return;
+ }
#if ELPP_LOGGING_ENABLED
if (ELPP->hasFlag(LoggingFlag::MultiLoggerSupport)) {
bool firstDispatched = false;
@@ -3006,6 +3016,7 @@ void Writer::processDispatch() {
m_logger->releaseLock();
}
#endif // ELPP_LOGGING_ENABLED
+ in_dispatch.clear();
}
void Writer::triggerDispatch(void) {