easyloggingpp icon indicating copy to clipboard operation
easyloggingpp copied to clipboard

Deadlock with "sub-logging" with clang++ on MacOSX

Open yokujin opened this issue 10 years ago • 2 comments

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.

yokujin avatar Feb 01 '15 12:02 yokujin

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

abumq avatar Feb 04 '15 10:02 abumq

Can I work on this? #readytowork

bharsaklemukesh975 avatar Apr 14 '23 01:04 bharsaklemukesh975