You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assertion failed: (FoundCXX && "Record type mismatch"), function VisitRecordDecl, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/llvm/tools/clang/lib/AST/ASTImporter.cpp, line 2678.
I've been able to reliably cause LLDB to crash when debugging an app that uses multiple static libraries, where at least 1 static library is Swift based and depends on a different Objective-C based static library. The important steps for repro are: disable serialize debugging options and rely on a struct from iOS SDK (e.g. CGRect, UIEdgeInsets) in the Objective-C code. I'm attaching a crash report from LLDB and an example Xcode project that demonstrates the crash.
In my Xcode project, I've used a xcconfig to set -no-serialize-debug-options for the Swift components and customized the Swift import paths to find a modulemap file for the Objective-C based static library. This is configured to be as similar as possible to my "real" projects that use Bazel.
The Xcode project includes:
An app target with an empty Swift file, this is just to link together the relevant static libraries.
A Swift based static library, AppLibrary, that includes the app's AppDelegate.
An Objective-C based static library, CoreLibrary, which includes an Objective-C view controller. This implementation includes a method whose signature includes a CGRect, which seems to be part of the root cause of the LLDB crash.
I repro'd this on the latest available toolchain snapshot, from 11/6/19.
I believe this is specific to Swift's LLDB because there are no issues with similar pure Objective-C projects.
The text was updated successfully, but these errors were encountered:
I should note that this crash no longer occurs if I set `target.swift-extra-clang-flags` in the .lldinit file, which is probably the correct solution. But I think it would be better if LLDB didn't crash even when the correct clang flags are unavailable. Interestingly, I also discovered that the crash is prevented if I pass any clang flags that start with "--" (even if the flags are just bogus/garbage).
Attachment: Download
Environment
Swift toolchain - Development Snapshot from 11/6/19
https://swift.org/builds/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2019-11-06-a/swift-DEVELOPMENT-SNAPSHOT-2019-11-06-a-osx.pkg
Xcode version - 11.1 and 11.2.1 GM seed
Additional Detail from JIRA
md5: f5e19670c752d1a0f75ab31541b16ed0
Issue Description:
I'm seeing a crash with the following synopsis:
Assertion failed: (FoundCXX && "Record type mismatch"), function VisitRecordDecl, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/llvm/tools/clang/lib/AST/ASTImporter.cpp, line 2678.
I've been able to reliably cause LLDB to crash when debugging an app that uses multiple static libraries, where at least 1 static library is Swift based and depends on a different Objective-C based static library. The important steps for repro are: disable serialize debugging options and rely on a struct from iOS SDK (e.g. CGRect, UIEdgeInsets) in the Objective-C code. I'm attaching a crash report from LLDB and an example Xcode project that demonstrates the crash.
In my Xcode project, I've used a xcconfig to set -no-serialize-debug-options for the Swift components and customized the Swift import paths to find a modulemap file for the Objective-C based static library. This is configured to be as similar as possible to my "real" projects that use Bazel.
The Xcode project includes:
I repro'd this on the latest available toolchain snapshot, from 11/6/19.
I believe this is specific to Swift's LLDB because there are no issues with similar pure Objective-C projects.
The text was updated successfully, but these errors were encountered: