Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
lldb heap exhaustion when running backtrace on Swift-using app
(lldb) break set -E ObjC Breakpoint 2: where = libobjc.A.dylib`objc_exception_throw, address = 0x00007fff513fbaf0
(lldb) cont
Process 78556 resuming
Process 78556 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
frame #0: 0x00007fff513fbaf0 libobjc.A.dylib`objc_exception_throw
libobjc.A.dylib`objc_exception_throw:
-> 0x7fff513fbaf0 <+0>: pushq %rbp
0x7fff513fbaf1 <+1>: movq %rsp, %rbp
0x7fff513fbaf4 <+4>: pushq %r15
0x7fff513fbaf6 <+6>: pushq %r14
Target 0: (snip) stopped.
(lldb) bt
0 lldb 0x0000000107783705 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 lldb 0x0000000107782d77 llvm::sys::RunSignalHandlers() + 39
2 lldb 0x0000000107783d58 SignalHandler(int) + 264
3 libsystem_platform.dylib 0x00007fff69148b5d _sigtramp + 29
4 libsystem_malloc.dylib 0x00007fff69107c99 malloc_zone_malloc + 103
5 LLDB 0x000000010bb945b7 lldb_private::Thread::QueueThreadPlan(std::__1::shared_ptr<lldb_private::ThreadPlan>&, bool) + 167
6 LLDB 0x000000010bb3031a lldb_private::Process::RunThreadPlan(lldb_private::ExecutionContext&, std::__1::shared_ptr<lldb_private::ThreadPlan>&, lldb_private::EvaluateExpressionOptions const&, lldb_private::DiagnosticManager&) + 1754
7 LLDB 0x000000010ba09343 lldb_private::FunctionCaller::ExecuteFunction(lldb_private::ExecutionContext&, unsigned long long*, lldb_private::EvaluateExpressionOptions const&, lldb_private::DiagnosticManager&, lldb_private::Value&) + 531
8 LLDB 0x000000010bd2b5f7 lldb_private::AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache() + 3015
9 LLDB 0x000000010bd2bd49 lldb_private::AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded() + 345
10 LLDB 0x000000010bb165dc lldb_private::ObjCLanguageRuntime::GetClassDescriptorFromISA(unsigned long long) + 60
11 LLDB 0x000000010bd29207 lldb_private::AppleObjCRuntimeV2::GetClassDescriptorFromISA(unsigned long long) + 103
12 LLDB 0x000000010bd29606 lldb_private::AppleObjCRuntimeV2::GetClassDescriptor(lldb_private::ValueObject&) + 390
13 LLDB 0x000000010bb164cd lldb_private::ObjCLanguageRuntime::GetNonKVOClassDescriptor(lldb_private::ValueObject&) + 29
14 LLDB 0x000000010bd285ec lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress(lldb_private::ValueObject&, lldb::DynamicValueType, lldb_private::TypeAndOrName&, lldb_private::Address&, lldb_private::Value::ValueType&, bool) + 156
15 LLDB 0x000000010bd288d8 lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress(lldb_private::ValueObject&, lldb::DynamicValueType, lldb_private::TypeAndOrName&, lldb_private::Address&, lldb_private::Value::ValueType&) + 24
16 LLDB 0x000000010b9dacec lldb_private::ValueObjectDynamicValue::UpdateValue() + 572
17 LLDB 0x000000010b9cc7f2 lldb_private::ValueObject::UpdateValueIfNeeded(bool) + 1250
18 LLDB 0x000000010b9da61a lldb_private::ValueObjectDynamicValue::GetCompilerTypeImpl() + 26
19 LLDB 0x000000010b9cd217 lldb_private::ValueObject::MaybeCalculateCompleteType() + 39
20 LLDB 0x000000010b9cc984 lldb_private::ValueObject::UpdateFormatsIfNeeded() + 100
21 LLDB 0x000000010b9d2ade lldb_private::ValueObject::CalculateSyntheticValue(bool) + 94
22 LLDB 0x000000010b9d5097 lldb_private::ValueObject::GetQualifiedRepresentationIfAvailable(lldb::DynamicValueType, bool) + 311
23 LLDB 0x000000010b98f976 lldb_private::FormatEntity::Format(lldb_private::FormatEntity::Entry const&, lldb_private::Stream&, lldb_private::SymbolContext const*, lldb_private::ExecutionContext const*, lldb_private::Address const*, lldb_private::ValueObject*, bool, bool) + 11462
24 LLDB 0x000000010b98d3fa lldb_private::FormatEntity::Format(lldb_private::FormatEntity::Entry const&, lldb_private::Stream&, lldb_private::SymbolContext const*, lldb_private::ExecutionContext const*, lldb_private::Address const*, lldb_private::ValueObject*, bool, bool) + 1866
25 LLDB 0x000000010b98d3fa lldb_private::FormatEntity::Format(lldb_private::FormatEntity::Entry const&, lldb_private::Stream&, lldb_private::SymbolContext const*, lldb_private::ExecutionContext const*, lldb_private::Address const*, lldb_private::ValueObject*, bool, bool) + 1866
26 LLDB 0x000000010b98d54a lldb_private::FormatEntity::Format(lldb_private::FormatEntity::Entry const&, lldb_private::Stream&, lldb_private::SymbolContext const*, lldb_private::ExecutionContext const*, lldb_private::Address const*, lldb_private::ValueObject*, bool, bool) + 2202
27 LLDB 0x000000010bb43987 lldb_private::StackFrame::DumpUsingSettingsFormat(lldb_private::Stream*, bool, char const*) + 295
28 LLDB 0x000000010bb43ccf lldb_private::StackFrame::GetStatus(lldb_private::Stream&, bool, bool, bool, char const*) + 63
29 LLDB 0x000000010bb471aa lldb_private::StackFrameList::GetStatus(lldb_private::Stream&, unsigned int, unsigned int, bool, unsigned int, bool, char const*) + 378
30 LLDB 0x000000010bb9900d lldb_private::Thread::GetStatus(lldb_private::Stream&, unsigned int, unsigned int, unsigned int, bool, bool) + 845
31 LLDB 0x000000010bfcf876 CommandObjectThreadBacktrace::HandleOneThread(unsigned long long, lldb_private::CommandReturnObject&) + 118
32 LLDB 0x000000010bfcf37e CommandObjectIterateOverThreads::DoExecute(lldb_private::Args&, lldb_private::CommandReturnObject&) + 430
33 LLDB 0x000000010ba5b692 lldb_private::CommandObjectParsed::Execute(char const*, lldb_private::CommandReturnObject&) + 418
34 LLDB 0x000000010ba52e35 lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&, lldb_private::ExecutionContext*, bool, bool) + 2805
35 LLDB 0x000000010ba5ce71 lldb_private::CommandObjectRegexCommand::DoExecute(llvm::StringRef, lldb_private::CommandReturnObject&) + 849
36 LLDB 0x000000010ba5b88b lldb_private::CommandObjectRaw::Execute(char const*, lldb_private::CommandReturnObject&) + 427
37 LLDB 0x000000010ba52e35 lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&, lldb_private::ExecutionContext*, bool, bool) + 2805
38 LLDB 0x000000010ba56e71 lldb_private::CommandInterpreter::IOHandlerInputComplete(lldb_private::IOHandler&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 657
39 LLDB 0x000000010b9950ad lldb_private::IOHandlerEditline::Run() + 285
40 LLDB 0x000000010b97c4db lldb_private::Debugger::ExecuteIOHandlers() + 123
41 LLDB 0x000000010ba579ac lldb_private::CommandInterpreter::RunCommandInterpreter(bool, bool, lldb_private::CommandInterpreterRunOptions&) + 156
42 LLDB 0x000000010b800ca1 lldb::SBDebugger::RunCommandInterpreter(bool, bool) + 209
43 lldb 0x000000010776e665 Driver::MainLoop() + 2853
44 lldb 0x000000010776f5d2 main + 1634
45 libdyld.dylib 0x00007fff68f5d3d5 start + 1
46 libdyld.dylib 0x0000000000000001 start + 2534026285
Stack dump:
0. Program arguments: /Applications/Xcode.app/Contents/Developer/usr/bin/lldb
[1] 95536 segmentation fault lldb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.