swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.37k stars 10.34k forks source link

[SR-13783] Segmentation fault in Xcode 12 which was not present in Xcode 11 #56180

Open swift-ci opened 3 years ago

swift-ci commented 3 years ago
Previous ID SR-13783
Radar rdar://problem/70730991
Original Reporter Borisov (JIRA User)
Type Bug
Environment Xcode 12
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 8f68464c9bf51dffe84c78940bb3b711

Issue Description:

I have trouble reproducing the issue since this is a large project and I can't pinpoint the file in which it happens. It builds fine on Xcode 11, but fails on Xcode 12 with this segmentation fault:

1. Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)

2. While reading from 'Swift'

0 swift 0x0000000107e1c865 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37

1 swift 0x0000000107e1b865 llvm::sys::RunSignalHandlers() + 85

2 swift 0x0000000107e1ce1f SignalHandler(int) + 111

3 libsystem_platform.dylib 0x00007fff73ac35fd _sigtramp + 29

4 libsystem_platform.dylib 0x00007ffe00000002 _sigtramp + 18446744067473918498

5 swift 0x0000000107df11bc llvm::vfs::VFSFromYamlDirIterImpl::incrementImpl(bool) + 156

6 swift 0x0000000107df10fd llvm::vfs::VFSFromYamlDirIterImpl::VFSFromYamlDirIterImpl(llvm::Twine const&, std::_1::wrap_iter\<std::1::unique_ptr\<llvm::vfs::RedirectingFileSystem::Entry, std::1::default_delete\<llvm::vfs::RedirectingFileSystem::Entry> >*>, std::1::wrap_iter\<std::1::unique_ptr\<llvm::vfs::RedirectingFileSystem::Entry, std::1::default_delete\<llvm::vfs::RedirectingFileSystem::Entry> >*>, bool, llvm::vfs::FileSystem&, std::_1::error_code&) + 141

7 swift 0x0000000107dee3d8 llvm::vfs::RedirectingFileSystem::dirbegin(llvm::Twine const&, std::\_1::error_code&) + 216

8 swift 0x0000000107a5c628 clang::HeaderSearch::loadSubdirectoryModuleMaps(clang::DirectoryLookup&) + 264

9 swift 0x0000000107a5c264 clang::HeaderSearch::lookupModule(llvm::StringRef, llvm::StringRef, bool) + 916

10 swift 0x0000000107a5be39 clang::HeaderSearch::lookupModule(llvm::StringRef, bool, bool) + 105

11 swift 0x0000000104958b77 swift::ClangImporter::Implementation::loadModuleClang(swift::SourceLoc, llvm::ArrayRef\<swift::Located\<swift::Identifier> >) + 103

12 swift 0x000000010495969b swift::ClangImporter::loadModule(swift::SourceLoc, llvm::ArrayRef\<swift::Located\<swift::Identifier> >) + 75

13 swift 0x00000001043fb766 swift::ModuleFile::getModule(llvm::ArrayRef\<swift::Identifier>, bool) + 534

14 swift 0x000000010444bdeb swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc, bool) + 1787

15 swift 0x00000001044b455d swift::SerializedModuleLoaderBase::loadAST(swift::ModuleDecl&, llvm::Optional\<swift::SourceLoc>, llvm::StringRef, std::_1::unique_ptr\<llvm::MemoryBuffer, std::1::default_delete\<llvm::MemoryBuffer> >, std::1::unique_ptr\<llvm::MemoryBuffer, std::1::default_delete\<llvm::MemoryBuffer> >, std::1::unique_ptr\<llvm::MemoryBuffer, std::_1::default_delete\<llvm::MemoryBuffer> >, bool, bool) + 1037

16 swift 0x00000001044b6a59 swift::SerializedModuleLoaderBase::loadModule(swift::SourceLoc, llvm::ArrayRef\<swift::Located\<swift::Identifier> >) + 825

17 swift 0x0000000104acb2b6 swift::ASTContext::getStdlibModule(bool) + 406

18 swift 0x0000000103abe869 swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 3497

19 swift 0x000000010398032d swift::performFrontend(llvm::ArrayRef\<char const*>, char const*, void*, swift::FrontendObserver*) + 6845

20 swift 0x0000000103904c37 main + 1255

21 libdyld.dylib 0x00007fff738cacc9 start + 1

22 libdyld.dylib 0x0000000000000084 start + 18446603338577564604

error: Segmentation fault: 11

typesanitizer commented 3 years ago

@swift-ci create