#include clang-repl> #include clang-repl> std::cout << getpid() << "\n"; 22603 clang-repl> void fn() { std::cout <<...">

LLDB crashes when setting a breakpoint to out-of-process JIT (original) (raw)

I am trying to debug JIT-compiled code using clang-repl for JITing and LLDB for debugging.
When I run clang-repl normally everything works fine. But when I run clang-repl out-of-proces, using #110418, LLDB crashes (message below).
clang-repl commands:

❯ ./bin/clang-repl -oop-executor -orc-runtime -Xcc="-g" -Xcc="-O0" -Xcc="-debugger-tuning=lldb"
clang-repl> #include <iostream>
clang-repl> #include <unistd.h>
clang-repl> std::cout << getpid()  << "\n";
22603
clang-repl> void fn() { std::cout << "Function fn()\n"; }
clang-repl> fn();
Function fn()
clang-repl> 

I am using pid to attach to the clang-repl process.
lldb crash:

(lldb) attach -p 48016
Process 48016 stopped
* thread #1, name = 'llvm-jitlink-ex', stop reason = signal SIGSTOP
    frame #0: 0x00007f51b36b2742 libc.so.6`__syscall_cancel_arch + 50
libc.so.6`__syscall_cancel_arch:
->  0x7f51b36b2742 <+50>: retq   

libc.so.6`__syscall_cancel_arch_end:
    0x7f51b36b2743 <+1>:  nopw   %cs:(%rax,%rax)
    0x7f51b36b274d <+11>: nopw   %cs:(%rax,%rax)
    0x7f51b36b2757 <+21>: nopw   %cs:(%rax,%rax)
  thread #2, name = 'llvm-jitlink-ex', stop reason = signal SIGSTOP
    frame #0: 0x00007f51b36b2742 libc.so.6`__syscall_cancel_arch + 50
libc.so.6`__syscall_cancel_arch:
->  0x7f51b36b2742 <+50>: retq   

libc.so.6`__syscall_cancel_arch_end:
    0x7f51b36b2743 <+1>:  nopw   %cs:(%rax,%rax)
    0x7f51b36b274d <+11>: nopw   %cs:(%rax,%rax)
    0x7f51b36b2757 <+21>: nopw   %cs:(%rax,%rax)
Executable module set to "/home/vipul-cariappa/Documents/Workspace/cpp-py/compiler-research/llvm-project/build/bin/llvm-jitlink-executor".
Architecture set to: x86_64-pc-linux-gnu.
(lldb) b fn
LLVM ERROR: out of memory
Allocation failed
PLEASE submit a bug report to  and include the crash backtrace.
Stack dump:
0.	Program arguments: lldb
1.	HandleCommand(command = "b fn")
2.	HandleCommand(command = "breakpoint set --name 'fn'")
 #0 0x00007c52bfc65d11 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/src/debug/llvm/llvm-19.1.7.src/lib/Support/Unix/Signals.inc:723:22
 #1 0x00007c52bfc63307 llvm::sys::RunSignalHandlers() /usr/src/debug/llvm/llvm-19.1.7.src/lib/Support/Signals.cpp:105:20
 #2 0x00007c52bfc63307 SignalHandler /usr/src/debug/llvm/llvm-19.1.7.src/lib/Support/Unix/Signals.inc:403:31
 #3 0x00007c52bec44720 (/usr/lib/libc.so.6+0x44720)
 #4 0x00007c52becabe4b __pthread_kill_implementation /usr/src/debug/glibc/glibc/nptl/pthread_kill.c:44:76
 #5 0x00007c52becabe4b __pthread_kill_internal /usr/src/debug/glibc/glibc/nptl/pthread_kill.c:89:10
 #6 0x00007c52becabe4b pthread_kill /usr/src/debug/glibc/glibc/nptl/pthread_kill.c💯10
 #7 0x00007c52bec445e8 raise /usr/src/debug/glibc/glibc/signal/../sysdeps/posix/raise.c:27:6
 #8 0x00007c52bec2560f internal_signal_block_all /usr/src/debug/glibc/glibc/stdlib/../sysdeps/unix/sysv/linux/internal-signals.h:81:3
 #9 0x00007c52bec2560f __abort_lock_wrlock /usr/src/debug/glibc/glibc/stdlib/abort.c:58:3
#10 0x00007c52bec2560f abort /usr/src/debug/glibc/glibc/stdlib/abort.c:81:3
#11 0x00007c52bfb5a2e8 (/usr/lib/libLLVM.so.19.1+0x75a2e8)
#12 0x00007c52bfb5a30b (/usr/lib/libLLVM.so.19.1+0x75a30b)
#13 0x00007c52bf0b4605 operator new(unsigned long) /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/new_op.cc:55:15
#14 0x00007c52c8df434d unsigned char* std::uninitialized_fill_n<unsigned char*, unsigned long, unsigned char>(unsigned char*, unsigned long, unsigned char const&) /usr/include/c++/15.1.1/bits/stl_uninitialized.h:553:25
#15 0x00007c52c8df434d unsigned char* std::__uninitialized_fill_n_a<unsigned char*, unsigned long, unsigned char, unsigned char>(unsigned char*, unsigned long, unsigned char const&, std::allocator<unsigned char>&) /usr/include/c++/15.1.1/bits/stl_uninitialized.h:727:39
#16 0x00007c52c8df434d std::vector<unsigned char, std::allocator<unsigned char>>::_M_fill_initialize(unsigned long, unsigned char const&) /usr/include/c++/15.1.1/bits/stl_vector.h:1999:33
#17 0x00007c52c8df434d std::vector<unsigned char, std::allocator<unsigned char>>::vector(unsigned long, unsigned char const&, std::allocator<unsigned char> const&) /usr/include/c++/15.1.1/bits/stl_vector.h:602:27
#18 0x00007c52c8df434d std::vector<unsigned char, std::allocator<unsigned char>>::_M_fill_assign(unsigned long, unsigned char const&) /usr/include/c++/15.1.1/bits/vector.tcc:278:11
#19 0x00007c52c8f94051 lldb_private::WritableDataBuffer::GetBytes() /usr/src/debug/lldb/lldb-19.1.7.src/include/lldb/Utility/DataBuffer.h:108:66
#20 0x00007c52c8f94051 ObjectFileELF::ReadSectionData(lldb_private::Section*, lldb_private::DataExtractor&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:3648:44
#21 0x00007c52c915b934 std::__shared_ptr<lldb_private::DataBuffer, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<lldb_private::DataBuffer, (__gnu_cxx::_Lock_policy)2>&&) /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1539:20
#22 0x00007c52c915b934 std::shared_ptr<lldb_private::DataBuffer>::shared_ptr(std::shared_ptr<lldb_private::DataBuffer>&&) /usr/include/c++/15.1.1/bits/shared_ptr.h:359:41
#23 0x00007c52c915b934 lldb_private::DataExtractor::DataExtractor(lldb_private::DataExtractor&&) /usr/src/debug/lldb/lldb-19.1.7.src/include/lldb/Utility/DataExtractor.h:160:3
#24 0x00007c52c915b934 lldb_private::DWARFDataExtractor::DWARFDataExtractor(lldb_private::DWARFDataExtractor&&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.h🔞7
#25 0x00007c52c915b934 LoadSection /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:29:10
#26 0x00007c52c915bb42 operator() /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:40:7
#27 0x00007c52c915bb42 __invoke_impl<void, lldb_private::plugin::dwarf::DWARFContext::LoadOrGetSection(std::optional<lldb::SectionType>, std::optional<lldb::SectionType>, SectionData&)::<lambda()> > /usr/include/c++/15.1.1/bits/invoke.h:63:36
#28 0x00007c52c915bb42 __invoke<lldb_private::plugin::dwarf::DWARFContext::LoadOrGetSection(std::optional<lldb::SectionType>, std::optional<lldb::SectionType>, SectionData&)::<lambda()> > /usr/include/c++/15.1.1/bits/invoke.h:98:40
#29 0x00007c52c915bb42 operator() /usr/include/c++/15.1.1/mutex:911:17
#30 0x00007c52c915bb42 operator() /usr/include/c++/15.1.1/mutex:847:64
#31 0x00007c52c915bb42 _FUN /usr/include/c++/15.1.1/mutex:847:16
#32 0x00007c52becaf509 __pthread_once_slow /usr/src/debug/glibc/glibc/nptl/pthread_once.c:118:7
#33 0x00007c52becaf589 __pthread_once /usr/src/debug/glibc/glibc/nptl/pthread_once.c:144:1
#34 0x00007c52c916420d call_once<lldb_private::plugin::dwarf::DWARFContext::LoadOrGetSection(std::optional<lldb::SectionType>, std::optional<lldb::SectionType>, SectionData&)::<lambda()> > /usr/include/c++/15.1.1/mutex:918:7
#35 0x00007c52c916420d call_once<lldb_private::plugin::dwarf::DWARFContext::LoadOrGetSection(std::optional<lldb::SectionType>, std::optional<lldb::SectionType>, SectionData&)::<lambda()> > /usr/include/llvm/Support/Threading.h:89:19
#36 0x00007c52c916420d lldb_private::plugin::dwarf::DWARFContext::LoadOrGetSection(std::optional<lldb::SectionType>, std::optional<lldb::SectionType>, lldb_private::plugin::dwarf::DWARFContext::SectionData&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:36:18
#37 0x00007c52c916420d lldb_private::plugin::dwarf::DWARFContext::getOrLoadDebugInfoData() /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:71:26
#38 0x00007c52c916420d lldb_private::plugin::dwarf::DWARFDebugInfo::ParseUnitsFor(lldb_private::plugin::dwarf::DIERef::Section) /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp:82:67
#39 0x00007c52c9165969 operator() /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp:176:18
#40 0x00007c52c9165969 __invoke_impl<void, lldb_private::plugin::dwarf::DWARFDebugInfo::ParseUnitHeadersIfNeeded()::<lambda()> > /usr/include/c++/15.1.1/bits/invoke.h:63:36
#41 0x00007c52c9165969 __invoke<lldb_private::plugin::dwarf::DWARFDebugInfo::ParseUnitHeadersIfNeeded()::<lambda()> > /usr/include/c++/15.1.1/bits/invoke.h:98:40
#42 0x00007c52c9165969 operator() /usr/include/c++/15.1.1/mutex:911:17
#43 0x00007c52c9165969 operator() /usr/include/c++/15.1.1/mutex:847:64
#44 0x00007c52c9165969 _FUN /usr/include/c++/15.1.1/mutex:847:16
#45 0x00007c52becaf509 __pthread_once_slow /usr/src/debug/glibc/glibc/nptl/pthread_once.c:118:7
#46 0x00007c52becaf589 __pthread_once /usr/src/debug/glibc/glibc/nptl/pthread_once.c:144:1
#47 0x00007c52c915edd7 call_once<lldb_private::plugin::dwarf::DWARFDebugInfo::ParseUnitHeadersIfNeeded()::<lambda()> > /usr/include/c++/15.1.1/mutex:918:7
#48 0x00007c52c915edd7 call_once<lldb_private::plugin::dwarf::DWARFDebugInfo::ParseUnitHeadersIfNeeded()::<lambda()> > /usr/include/llvm/Support/Threading.h:89:19
#49 0x00007c52c915edd7 lldb_private::plugin::dwarf::DWARFDebugInfo::ParseUnitHeadersIfNeeded() /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp:174:18
#50 0x00007c52c915edd7 lldb_private::plugin::dwarf::DWARFDebugInfo::GetNumUnits() /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp:182:27
#51 0x00007c52c916a20c lldb_private::plugin::dwarf::ManualDWARFIndex::Index() /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp:50:47
#52 0x00007c52c916c99b lldb_private::Module::LookupInfo::GetLookupName() const /usr/src/debug/lldb/lldb-19.1.7.src/include/lldb/Core/Module.h:915:48
#53 0x00007c52c916c99b lldb_private::plugin::dwarf::ManualDWARFIndex::GetFunctions(lldb_private::Module::LookupInfo const&, lldb_private::plugin::dwarf::SymbolFileDWARF&, lldb_private::CompilerDeclContext const&, llvm::function_ref<bool (lldb_private::plugin::dwarf::DWARFDIE)>) /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp:451:47
#54 0x00007c52c9115613 llvm::StringMapEntryBase::getKeyLength() const /usr/include/llvm/ADT/StringMapEntry.h:31:40
#55 0x00007c52c9115613 llvm::StringMapEntry<char const*>::getKey() const /usr/include/llvm/ADT/StringMapEntry.h:109:12
#56 0x00007c52c9115613 Pool::GetConstCStringLength(char const*) /usr/src/debug/lldb/lldb-19.1.7.src/source/Utility/ConstString.cpp:75:26
#57 0x00007c52c9115613 lldb_private::ConstString::GetLength() const /usr/src/debug/lldb/lldb-19.1.7.src/source/Utility/ConstString.cpp:244:37
#58 0x00007c52c9115613 lldb_private::ConstString::GetStringRef() const /usr/src/debug/lldb/lldb-19.1.7.src/include/lldb/Utility/ConstString.h:198:49
#59 0x00007c52c9115613 lldb_private::plugin::dwarf::SymbolFileDWARF::FindFunctions(lldb_private::Module::LookupInfo const&, lldb_private::CompilerDeclContext const&, bool, lldb_private::SymbolContextList&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2609:55
#60 0x00007c52c8baa81f lldb_private::Module::FindFunctions(lldb_private::Module::LookupInfo const&, lldb_private::CompilerDeclContext const&, lldb_private::ModuleFunctionSearchOptions const&, lldb_private::SymbolContextList&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Core/Module.cpp:834:5
#61 0x00007c52c8b718bd std::vector<lldb_private::SymbolContext, std::allocator<lldb_private::SymbolContext>>::size() const /usr/include/c++/15.1.1/bits/stl_vector.h:1119:44
#62 0x00007c52c8b718bd lldb_private::SymbolContextList::GetSize() const /usr/src/debug/lldb/lldb-19.1.7.src/source/Symbol/SymbolContext.cpp:1286:76
#63 0x00007c52c8b718bd lldb_private::BreakpointResolverName::SearchCallback(lldb_private::SearchFilter&, lldb_private::SymbolContext&, lldb_private::Address*) /usr/src/debug/lldb/lldb-19.1.7.src/source/Breakpoint/BreakpointResolverName.cpp:278:54
#64 0x00007c52c8bce930 lldb_private::SearchFilter::DoModuleIteration(lldb_private::SymbolContext const&, lldb_private::Searcher&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Core/SearchFilter.cpp:272:7
#65 0x00007c52c8bceaa4 lldb_private::SearchFilter::Search(lldb_private::Searcher&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Core/SearchFilter.cpp:217:1
#66 0x00007c52c8d877c3 lldb_private::ElapsedTime::~ElapsedTime() /usr/src/debug/lldb/lldb-19.1.7.src/include/lldb/Target/Statistics.h:80:51
#67 0x00007c52c8d877c3 lldb_private::Breakpoint::ResolveBreakpoint() /usr/src/debug/lldb/lldb-19.1.7.src/source/Breakpoint/Breakpoint.cpp:441:3
#68 0x00007c52c8d877c3 lldb_private::Target::AddBreakpoint(std::shared_ptr<lldb_private::Breakpoint>, bool) /usr/src/debug/lldb/lldb-19.1.7.src/source/Target/Target.cpp:724:27
#69 0x00007c52c8d87cd8 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1068:6
#70 0x00007c52c8d87cd8 std::__shared_ptr<lldb_private::Breakpoint, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1531:7
#71 0x00007c52c8d87cd8 std::shared_ptr<lldb_private::Breakpoint>::~shared_ptr() /usr/include/c++/15.1.1/bits/shared_ptr.h:175:11
#72 0x00007c52c8d87cd8 lldb_private::Target::CreateBreakpoint(std::shared_ptr<lldb_private::SearchFilter>&, std::shared_ptr<lldb_private::BreakpointResolver>&, bool, bool, bool) /usr/src/debug/lldb/lldb-19.1.7.src/source/Target/Target.cpp:703:18
#73 0x00007c52c8d865e7 std::__shared_ptr<lldb_private::Breakpoint, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<lldb_private::Breakpoint, (__gnu_cxx::_Lock_policy)2>&&) /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1539:20
#74 0x00007c52c8d865e7 std::__shared_ptr<lldb_private::Breakpoint, (__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<lldb_private::Breakpoint, (__gnu_cxx::_Lock_policy)2>&&) /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1627:2
#75 0x00007c52c8d865e7 std::shared_ptr<lldb_private::Breakpoint>::operator=(std::shared_ptr<lldb_private::Breakpoint>&&) /usr/include/c++/15.1.1/bits/shared_ptr.h:439:36
#76 0x00007c52c8d865e7 lldb_private::Target::CreateBreakpoint(lldb_private::FileSpecList const*, lldb_private::FileSpecList const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, lldb::FunctionNameType, lldb::LanguageType, unsigned long, lldb_private::LazyBool, bool, bool) /usr/src/debug/lldb/lldb-19.1.7.src/source/Target/Target.cpp:538:78
#77 0x00007c52c91fd614 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::_M_swap(std::__shared_count<(__gnu_cxx::_Lock_policy)2>&) /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1097:25
#78 0x00007c52c91fd614 std::__shared_ptr<lldb_private::Breakpoint, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<lldb_private::Breakpoint, (__gnu_cxx::_Lock_policy)2>&&) /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1541:21
#79 0x00007c52c91fd614 std::__shared_ptr<lldb_private::Breakpoint, (__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<lldb_private::Breakpoint, (__gnu_cxx::_Lock_policy)2>&&) /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1627:2
#80 0x00007c52c91fd614 std::shared_ptr<lldb_private::Breakpoint>::operator=(std::shared_ptr<lldb_private::Breakpoint>&&) /usr/include/c++/15.1.1/bits/shared_ptr.h:439:36
#81 0x00007c52c91fd614 CommandObjectBreakpointSet::DoExecute(lldb_private::Args&, lldb_private::CommandReturnObject&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Commands/CommandObjectBreakpoint.cpp:641:31
#82 0x00007c52c8c8e62e std::__shared_count<(__gnu_cxx::_Lock_policy)2>::_M_swap(std::__shared_count<(__gnu_cxx::_Lock_policy)2>&) /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1097:25
#83 0x00007c52c8c8e62e std::__shared_ptr<lldb_private::Target, (__gnu_cxx::_Lock_policy)2>::swap(std::__shared_ptr<lldb_private::Target, (__gnu_cxx::_Lock_policy)2>&) /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1694:21
#84 0x00007c52c8c8e62e std::__shared_ptr<lldb_private::Target, (__gnu_cxx::_Lock_policy)2>::reset() /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1649:28
#85 0x00007c52c8c8e62e lldb_private::ExecutionContext::Clear() /usr/src/debug/lldb/lldb-19.1.7.src/source/Target/ExecutionContext.cpp:167:20
#86 0x00007c52c8c8e62e lldb_private::CommandObject::Cleanup() /usr/src/debug/lldb/lldb-19.1.7.src/source/Interpreter/CommandObject.cpp:270:18
#87 0x00007c52c8c8e62e lldb_private::CommandObjectParsed::Execute(char const*, lldb_private::CommandReturnObject&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Interpreter/CommandObject.cpp:833:12
#88 0x00007c52c8c74b21 lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&, bool) (.constprop.0) /usr/src/debug/lldb/lldb-19.1.7.src/source/Interpreter/CommandInterpreter.cpp:2042:3
#89 0x00007c52c925e7af lldb_private::CommandObjectRegexCommand::DoExecute(llvm::StringRef, lldb_private::CommandReturnObject&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Commands/CommandObjectRegexCommand.cpp:78:7
#90 0x00007c52c8c8ebd8 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::_M_swap(std::__shared_count<(__gnu_cxx::_Lock_policy)2>&) /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1097:25
#91 0x00007c52c8c8ebd8 std::__shared_ptr<lldb_private::Target, (__gnu_cxx::_Lock_policy)2>::swap(std::__shared_ptr<lldb_private::Target, (__gnu_cxx::_Lock_policy)2>&) /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1694:21
#92 0x00007c52c8c8ebd8 std::__shared_ptr<lldb_private::Target, (__gnu_cxx::_Lock_policy)2>::reset() /usr/include/c++/15.1.1/bits/shared_ptr_base.h:1649:28
#93 0x00007c52c8c8ebd8 lldb_private::ExecutionContext::Clear() /usr/src/debug/lldb/lldb-19.1.7.src/source/Target/ExecutionContext.cpp:167:20
#94 0x00007c52c8c8ebd8 lldb_private::CommandObject::Cleanup() /usr/src/debug/lldb/lldb-19.1.7.src/source/Interpreter/CommandObject.cpp:270:18
#95 0x00007c52c8c8ebd8 lldb_private::CommandObjectRaw::Execute(char const*, lldb_private::CommandReturnObject&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Interpreter/CommandObject.cpp:852:12
#96 0x00007c52c8c75ad8 lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&, bool) (.constprop.1) /usr/src/debug/lldb/lldb-19.1.7.src/source/Interpreter/CommandInterpreter.cpp:2042:3
#97 0x00007c52c8c79f95 lldb_private::Flags::Test(unsigned int) const /usr/src/debug/lldb/lldb-19.1.7.src/include/lldb/Utility/Flags.h:96:44
#98 0x00007c52c8c79f95 lldb_private::CommandInterpreter::IOHandlerInputComplete(lldb_private::IOHandler&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Interpreter/CommandInterpreter.cpp:3141:34
#99 0x00007c52c8bb3183 lldb_private::IOHandlerEditline::Run() /usr/src/debug/lldb/lldb-19.1.7.src/source/Core/IOHandler.cpp:600:44
#100 0x00007c52c8b80909 __gthread_mutex_lock(pthread_mutex_t*) /usr/include/c++/15.1.1/x86_64-pc-linux-gnu/bits/gthr-default.h:795:41
#101 0x00007c52c8b80909 std::mutex::lock() /usr/include/c++/15.1.1/bits/std_mutex.h:115:37
#102 0x00007c52c8b80909 std::lock_guard<std::recursive_mutex>::lock_guard(std::recursive_mutex&) /usr/include/c++/15.1.1/bits/std_mutex.h:252:23
#103 0x00007c52c8b80909 lldb_private::Debugger::RunIOHandlers() /usr/src/debug/lldb/lldb-19.1.7.src/source/Core/Debugger.cpp:1108:41
#104 0x00007c52c8c7c374 lldb_private::CommandInterpreter::RunCommandInterpreter(lldb_private::CommandInterpreterRunOptions&) /usr/src/debug/lldb/lldb-19.1.7.src/source/Interpreter/CommandInterpreter.cpp:3404:5
#105 0x00007c52c88fabbe lldb::SBDebugger::RunCommandInterpreter(bool, bool) /usr/src/debug/lldb/lldb-19.1.7.src/source/API/SBDebugger.cpp:1253:1
#106 0x000058982760d062 Driver::MainLoop() /usr/src/debug/lldb/lldb-19.1.7.src/tools/driver/Driver.cpp:617:39
#107 0x000058982760d062 main /usr/src/debug/lldb/lldb-19.1.7.src/tools/driver/Driver.cpp:807:34
#108 0x00007c52bec27b8b __libc_start_call_main /usr/src/debug/glibc/glibc/csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#109 0x00007c52bec27c3b call_init /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:128:20
#110 0x00007c52bec27c3b __libc_start_main /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:347:5
#111 0x000058982760dde5 (/usr/bin/lldb+0x7de5)
LLDB diagnostics will be written to /tmp/diagnostics-e2ad48
Please include the directory content when filing a bug report
fish: Job 1, 'lldb' terminated by signal SIGABRT (Abort)

Setting breakpoint to fn crashes LLDB with out of memory. But if clang-repl is run without -oop-executor and -orc-runtime flags, LLDB works as expected.

This is working fine with gdb.

Versions:

❯ ./bin/clang-repl --version
LLVM (http://llvm.org/):
  LLVM version 20.1.7
  DEBUG build with assertions.
❯ lldb -v
lldb version 19.1.7
  clang revision b536128bd29a83a26c0aafda19942995b30fc5fd
  llvm revision b536128bd29a83a26c0aafda19942995b30fc5fd

Ping @vvassilev @lhames