Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-16003] "Error: Abort trap: 6" in library after upgrade Xcode to 13.3 #58264

Closed
swift-ci opened this issue Mar 17, 2022 · 2 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-16003
Radar None
Original Reporter Eckhardt (JIRA User)
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 7c7bf5371add5a4e026f33bcb667ad42

is duplicated by:

  • SR-16022 Archiving aborts when UI_USER_INTERFACE_IDIOM() is encountered

Issue Description:

After upgrading Xcode to 13.3 from 13.2, I get this error when attempting to build a certain library.

Please see this issue posted on the library's GitHub page: longitachi/ZLPhotoBrowser#699

I am able to build to my device, but I cannot create an archive for an App Store or TestFlight release. I am able to archive if I remove the library from my project.

The below stack trace requests that we report this issue to you.

Stack trace, copied from the aforementioned issue page:

SwiftCodeGeneration normal arm64 (in target 'ZLPhotoBrowser' from project 'Pods')SwiftCodeGeneration normal arm64 (in target 'ZLPhotoBrowser' from project 'Pods')
 cd /Users/horizon/Desktop/Github/MWWaterMarkCamera/MWWaterMarkCamera/Pods
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/horizon/Library/Developer/Xcode/DerivedData/MWWaterMarkCamera-fvrivqdzifhdrwdxddrcmontekrr/Build/Intermediates.noindex/ArchiveIntermediates/MWWaterMarkCamera/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/ZLPhotoBrowser.build/Objects-normal/arm64/ZLThumbnailViewController.bc -embed-bitcode -target arm64-apple-ios10.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name ZLPhotoBrowser -o /Users/horizon/Library/Developer/Xcode/DerivedData/MWWaterMarkCamera-fvrivqdzifhdrwdxddrcmontekrr/Build/Intermediates.noindex/ArchiveIntermediates/MWWaterMarkCamera/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/ZLPhotoBrowser.build/Objects-normal/arm64/ZLThumbnailViewController.o

LLVM ERROR: out of memory

Allocation failed

Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.

Stack dump:

0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/horizon/Library/Developer/Xcode/DerivedData/MWWaterMarkCamera-fvrivqdzifhdrwdxddrcmontekrr/Build/Intermediates.noindex/ArchiveIntermediates/MWWaterMarkCamera/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/ZLPhotoBrowser.build/Objects-normal/arm64/ZLThumbnailViewController.bc -embed-bitcode -target arm64-apple-ios10.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name ZLPhotoBrowser -o /Users/horizon/Library/Developer/Xcode/DerivedData/MWWaterMarkCamera-fvrivqdzifhdrwdxddrcmontekrr/Build/Intermediates.noindex/ArchiveIntermediates/MWWaterMarkCamera/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/ZLPhotoBrowser.build/Objects-normal/arm64/ZLThumbnailViewController.o
1. Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
2. Compiling with the current language version
3. Running pass 'Function Pass Manager' on module '/Users/horizon/Library/Developer/Xcode/DerivedData/MWWaterMarkCamera-fvrivqdzifhdrwdxddrcmontekrr/Build/Intermediates.noindex/ArchiveIntermediates/MWWaterMarkCamera/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/ZLPhotoBrowser.build/Objects-normal/arm64/ZLThumbnailViewController.bc'.
4. Running pass 'ObjC ARC contraction' on function '@UI_USER_INTERFACE_IDIOM'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  swift-frontend           0x00000001112b0de7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1  swift-frontend           0x00000001112afe38 llvm::sys::RunSignalHandlers() + 248
2  swift-frontend           0x00000001112b1440 SignalHandler(int) + 288
3  libsystem_platform.dylib 0x00007ff81b383dfd _sigtramp + 29
4  libsystem_malloc.dylib   0x00007ff81b1a1abb _malloc_zone_malloc + 125
5  libsystem_c.dylib        0x00007ff81b2b9d24 abort + 123
6  swift-frontend           0x00000001111fdcda llvm::report_bad_alloc_error(char const*, bool) + 106
7  swift-frontend           0x00000001111fdcf2 out_of_memory_new_handler() + 18
8  libc++abi.dylib          0x00007ff81b32b96b operator new(unsigned long) + 43
9  swift-frontend           0x0000000110fbeefd llvm::Function::BuildLazyArguments() const + 77
10 swift-frontend           0x000000010eda7e87 llvm::objcarc::BundledRetainClaimRVs::insertRVCallWithColors(llvm::Instruction*, llvm::CallBase*, llvm::DenseMap<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*>, llvm::DenseMapInfo<llvm::BasicBlock*>, llvm::detail::DenseMapPair<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*> > > const&) + 151
11 swift-frontend           0x000000010edbaf88 (anonymous namespace)::ObjCARCContract::run(llvm::Function&, llvm::AAResults*, llvm::DominatorTree*) + 1384
12 swift-frontend           0x0000000110ff6380 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1488
13 swift-frontend           0x0000000110ffd073 llvm::FPPassManager::runOnModule(llvm::Module&) + 67
14 swift-frontend           0x0000000110ff6b39 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1161
15 swift-frontend           0x000000010c5146df swift::performLLVMOptimizations(swift::IRGenOptions const&, llvm::Module*, llvm::TargetMachine*) + 3791
16 swift-frontend           0x000000010c5158cc swift::performLLVM(swift::IRGenOptions const&, swift::DiagnosticEngine&, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*, llvm::TargetMachine*, llvm::StringRef, swift::UnifiedStatsReporter*) + 2812
17 swift-frontend           0x000000010c51eaa5 swift::performLLVM(swift::IRGenOptions const&, swift::ASTContext&, llvm::Module*, llvm::StringRef) + 213
18 swift-frontend           0x000000010bfd9795 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 16565
19 swift-frontend           0x000000010bf985d4 swift::mainEntry(int, char const**) + 1108
20 dyld                     0x000000011cb5751e start + 462
error: Abort trap: 6 (in target 'ZLPhotoBrowser' from project 'Pods')
@dmcgloin
Copy link
Mannequin

dmcgloin mannequin commented Mar 18, 2022

You can work around this issue by replacing UI_USER_INTERFACE_IDIOM() with UIDevice.current.userInterfaceIdiom

@swift-ci
Copy link
Collaborator Author

Comment by Jordan (JIRA)

Fix works, thanks!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

1 participant