[swift-users] LLDB Frontend crash

Edward Connell ewconnell at gmail.com
Tue Jul 4 15:44:10 CDT 2017

I have been blocked for several weeks with this LLDB crashing bug, but it
has not been assigned to anyone.
I'm providing repro steps with the LLDB CLI in order to remove any
possibility that it is caused by my IDE. I have had this independently
confirmed by one of the CLion engineers.

I logged the bug: https://bugs.swift.org/browse/SR-5226

I would really appreciate this being fixed so my development can continue.

thanks, Ed

Here is a simple 6 line repro
struct SomeStruct { }

func fetch(outputData: inout SomeStruct?) {
outputData = SomeStruct()

var outData: SomeStruct?

fetch(outputData: &outData)


1) build the project as HelloWorld (or whatever you like)
2) then from the LLDB CLI, set a breakpoint on line 5 and run
3) then examine outputData:  fr var -O outputData

This is the session output

$ lldb HelloWorld
(lldb) target create "HelloWorld"
Current executable set to 'HelloWorld' (x86_64).
(lldb) br se --file main.swift --line 5
Breakpoint 1: where = HelloWorld`HelloWorld.fetch(outputData: inout
Swift.Optional<HelloWorld.SomeStruct>) -> () + 28 at main.swift:5, address
= 0x0000000000400b6c
(lldb) r
Process 14669 launched:
'/home/ed/CLionProjects/untitled1/.build/debug/HelloWorld' (x86_64)
Process 14669 stopped

   - thread #1, name = 'HelloWorld', stop reason = breakpoint 1.1
   frame #0: 0x0000000000400b6c HelloWorld`fetch(outputData=some) at
   3 func fetch(outputData: inout SomeStruct?) { 4 outputData =
   SomeStruct() -> 5 }

   7 var outData: SomeStruct?
   Target 0: (HelloWorld) stopped.
   (lldb) fr var -O outputData
   const swift::Lowering::TypeLowering
   Assertion `key.SubstType->isLegalSILType() && "type is not already
   lowered"' failed.
   Stack dump:
   0. HandleCommand(command = "fr var -O outputData")
   Aborted (core dumped)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170704/e3ff2a67/attachment.html>

More information about the swift-users mailing list