You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When build easylogging++ with -DELPP_EXPERIMENTAL_ASYNC to enable async logging, Storage constructor will call m_asyncDispatchWorker->start() which creates a worker thread and join() it. Now the Storage constructor will not return until the worker thread finished and the global variable (el::base::type::StoragePointer elStorage(val)) defined by INITIALIZE_EASYLOGGINGPP macro is an unfinished-constructedstd::shared_ptr. And the worker thread will call AsyncDispatchWorker::emptyQueue() which access ELPP macro causes segment fault as the global variable (el::base::type::StoragePointer elStorage(val)) is nullptr!
The text was updated successfully, but these errors were encountered:
When build easylogging++ with
-DELPP_EXPERIMENTAL_ASYNC
to enable async logging,Storage
constructor will callm_asyncDispatchWorker->start()
which creates a worker thread andjoin()
it. Now theStorage
constructor will not return until the worker thread finished and the global variable (el::base::type::StoragePointer elStorage(val)
) defined byINITIALIZE_EASYLOGGINGPP
macro is an unfinished-constructedstd::shared_ptr
. And the worker thread will callAsyncDispatchWorker::emptyQueue()
which accessELPP
macro causes segment fault as the global variable (el::base::type::StoragePointer elStorage(val)
) isnullptr
!The text was updated successfully, but these errors were encountered: