Skip to content

Easylogging is out-of-date, but new version crashes #106

@bredelings

Description

@bredelings

otcetera includes an old version of the easylogging library. This generates a lot of warnings, and perhaps even errors under clang.

However, the newer version crashes at runtime. I think this has to do with calling INITIALIZE_EASYLOGGING from within a shared library.

==706333== Invalid write of size 8
==706333== at 0x229449: std::__recursive_mutex_base::__recursive_mutex_base() (mutex:76)
==706333== by 0x229477: std::recursive_mutex::recursive_mutex() (mutex:97)
==706333== by 0x2294A5: el::base::threading::ThreadSafe::ThreadSafe() (easylogging++.hpp:1040)
==706333== by 0x50A7C41: el::base::utils::AbstractRegistry<el::base::HitCounter, std::vector<el::base::HitCounter*, std::allocatorel::base::HitCounter* > >::AbstractRegistry() (easylogging++.hpp:1293)
==706333== by 0x50A5567: el::base::utils::RegistryWithPred<el::base::HitCounter, el::base::HitCounter::Predicate>::RegistryWithPred() (easylogging++.hpp:1483)
==706333== by 0x50A33BF: el::base::RegisteredHitCounters::RegisteredHitCounters() (easylogging++.hpp:2150)
==706333== by 0x509C1F8: el::base::Storage::Storage(std::shared_ptrel::LogBuilder const&) (easylogging++.cpp:2067)
==706333== by 0x5036231: __static_initialization_and_destruction_0(int, int) (otcli.cpp:12)
==706333== by 0x5036311: _GLOBAL__sub_I_otcli.cpp (otcli.cpp:275)
==706333== by 0x400FFB1: call_init.part.0 (dl-init.c:72)
==706333== by 0x40100B8: call_init (dl-init.c:30)
==706333== by 0x40100B8: _dl_init (dl-init.c:119)

The easylogging project doesn't seem very interested in fixing this.

Can we get the new version working simply moving INITIALIZE_EASYLOGGING out of the shared lib?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions