swiftlang / swiftlang/swift

[SR-16107] Abort trap 6

Open
#58,366 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug code completion IDE support
Dominant language
Swift
Stars
70.4k
Forks
10.8k
PR merge metrics
PR metrics pending

Description

Previous ID SR-16107
Radar None
Original Reporter ryan97 (JIRA User)
Type Bug
Environment

Model Name: MacBook Pro

Model Identifier: MacBookPro18,1

Chip: Apple M1 Pro

Total Number of Cores: 10 (8 performance and 2 efficiency)

Memory: 16 GB

System Firmware Version: 7459.101.2

OS Loader Version: 7459.101.2

Additional Detail from JIRA
Votes 0
Component/s CodeCompletion
Labels Bug
Assignee None
Priority Medium

md5: 2225a888d974fc435613c2505d20b306

Issue Description:

0\. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/user/Library/Developer/Xcode/DerivedData/Runner-eoflzrinbvlqhfbycprgapdtwyqi/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/twilio_programmable_video.build/Objects-normal/arm64/PluginHandler.bc -embed-bitcode -target arm64-apple-ios13.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name twilio_programmable_video -o /Users/user/Library/Developer/Xcode/DerivedData/Runner-eoflzrinbvlqhfbycprgapdtwyqi/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/twilio_programmable_video.build/Objects-normal/arm64/PluginHandler.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/user/Library/Developer/Xcode/DerivedData/Runner-eoflzrinbvlqhfbycprgapdtwyqi/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/twilio_programmable_video.build/Objects-normal/arm64/PluginHandler.bc'.

4\. Running pass 'ObjC ARC contraction' on function '@kTVIDefaultAVAudioSessionConfigurationBlock_block_invoke'

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           0x0000000107ca3de7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39

1  swift-frontend           0x0000000107ca2e38 llvm::sys::RunSignalHandlers() + 248

2  swift-frontend           0x0000000107ca4440 SignalHandler(int) + 288

3  libsystem_platform.dylib 0x00007ff80b126dfd \_sigtramp + 29

4  libsystem_platform.dylib 0x0000000310fb0510 \_sigtramp + 18446603383564965680

5  libsystem_c.dylib        0x00007ff80b05cd24 abort + 123

6  swift-frontend           0x0000000107bf0cda llvm::report_bad_alloc_error(char const\*, bool) + 106

7  swift-frontend           0x0000000107bf0cf2 out_of_memory_new_handler() + 18

8  libc++abi.dylib          0x00007ff80b0ce96b operator new(unsigned long) + 43

9  swift-frontend           0x00000001079b1efd llvm::Function::BuildLazyArguments() const + 77

10 swift-frontend           0x000000010579ae87 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           0x00000001057adf88 (anonymous namespace)::ObjCARCContract::run(llvm::Function&, llvm::AAResults\*, llvm::DominatorTree\*) + 1384

12 swift-frontend           0x00000001079e9380 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1488

13 swift-frontend           0x00000001079f0073 llvm::FPPassManager::runOnModule(llvm::Module&) + 67

14 swift-frontend           0x00000001079e9b39 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1161

15 swift-frontend           0x0000000102f076df swift::performLLVMOptimizations(swift::IRGenOptions const&, llvm::Module\*, llvm::TargetMachine\*) + 3791

16 swift-frontend           0x0000000102f088cc 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           0x0000000102f11aa5 swift::performLLVM(swift::IRGenOptions const&, swift::ASTContext&, llvm::Module\*, llvm::StringRef) + 213

18 swift-frontend           0x00000001029cc795 swift::performFrontend(llvm::ArrayRef\<char const\*\>, char const\*, void\*, swift::FrontendObserver\*) + 16565

19 swift-frontend           0x000000010298b5d4 swift::mainEntry(int, char const\*\*) + 1108

20 dyld                     0x000000020a5cb51e start + 462

21 dyld                     0x0000000000000005 start + 18446744064945769653

error: Abort trap: 6 (in target 'twilio_programmable_video' from project 'Pods')

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported swift-frontend invocation and its stack trace, especially the ObjC ARC contraction pass and function @kTVIDefaultAVAudioSessionConfigurationBlock_block_invoke. Reproduce the Abort trap: 6 with the supplied Apple M1 Pro environment and determine a minimal input; done means the crash is isolated and covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.