[lldb-dev] SystemInitializerCommon::Initialize called twice with shared llvm build

İsmail Dönmez ismail at donmez.ws
Tue Jul 14 02:42:07 PDT 2015


Hi,

I am doing an llvm build with shared libraries and looks like due to
some weird interaction SystemInitializerCommon::Initialize() ends up
being called twice. This is how I produce:

λ lldb
(lldb) file ls
Current executable set to 'ls' (x86_64).
(lldb) r
<hangs>

Looking under with strace shows that lldb-server dies with:

[pid 15128] write(2, "lldb-server:
../lib/Support/ErrorHandling.cpp:50: void
llvm::install_fatal_error_handler(fatal_error_handler_t, void *):
Assertion `!ErrorHandler && \"Error handler already registered!\\n\"'
failed.\n", 196) = 196

I confirmed that indeed SystemInitializerCommon::Initialize() is being
called twice.

If I build llvm as static then the error goes away.

ismail




More information about the lldb-dev mailing list