easyloggingpp
easyloggingpp copied to clipboard
Deadlock with "sub-logging" with clang++ on MacOSX
This simple program deadlocks on line 7 (logging in function):
#define ELPP_THREAD_SAFE
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
std::string test() {
LOG(INFO) << "in test";
return "test-ret";
}
int main(int argc, char const *argv[])
{
LOG(INFO) << "calling test: " << test();
return 0;
}
When I remove thread safety it works, but messages are messed.
UPDATE: This happens only on Mac OS X (compiler AppleClang - Apple LLVM version 6.0 (clang-600.0.56)). Same program compiled on Linux (compiler GNU 4.9.1) works as expected.
Confirmed this bug on following platform
muflihun:STL mkhan$ clang++ -v
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
Can I work on this? #readytowork