Segmented Fault 11: error (Xcode 15)

I'm encountering an **error Segmentation fault: 11 ** during the archiving process. If the issue is happing with the my code. Then how can I diagnosing the problem. or figure out pin point in code base?

I changed the compiler optimization level. It works for me when I use the Osize compiler optimization level. Previously, it was set to Ospeed.

Want to know about the impact of the Osize compiler optimization level on the app.

Which program is crashing? Xcode itself? Or one of the tools that it sublaunches?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I was trying to archive iOS App. Using Xcode 15, But archiving is failing with following error

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):
08:42:27 0  swift-frontend           0x0000000102fadabc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
08:42:27 1  swift-frontend           0x0000000105c13cb0 llvm::sys::RunSignalHandlers() + 112
08:42:27 2  swift-frontend           0x000000010597d054 SignalHandler(int) + 352
08:42:27 3  libsystem_platform.dylib 0x000000018b142a24 _sigtramp + 56
08:42:27 4  swift-frontend           0x000000010238a26c swift::irgen::emitWitnessTableRef(swift::irgen::IRGenFunction&, swift::CanType, llvm::Value**, swift::ProtocolConformanceRef) + 264
08:42:27 5  swift-frontend           0x000000010238a26c swift::irgen::emitWitnessTableRef(swift::irgen::IRGenFunction&, swift::CanType, llvm::Value**, swift::ProtocolConformanceRef) + 264
08:42:27 6  swift-frontend           0x0000000102390020 swift::irgen::emitGenericRequirementFromSubstitutions(swift::irgen::IRGenFunction&, swift::GenericRequirement, swift::MetadataState, swift::SubstitutionMap, bool) + 312
08:42:27 7  swift-frontend           0x0000000101418f1c void llvm::function_ref<void (swift::GenericRequirement)>::callback_fn<(anonymous namespace)::EmitPolymorphicArguments::emit(swift::SubstitutionMap, swift::irgen::WitnessMetadata*, swift::irgen::Explosion&)::$_17>(long, swift::GenericRequirement) + 64
08:42:27 8  swift-frontend           0x0000000101419a48 void llvm::function_ref<void (swift::GenericRequirement)>::callback_fn<(anonymous namespace)::PolymorphicConvention::enumerateUnfulfilledRequirements(llvm::function_ref<void (swift::GenericRequirement)> const&)::$_8>(long, swift::GenericRequirement) + 212
08:42:27 9  swift-frontend           0x00000001042ee3e8 swift::irgen::enumerateGenericSignatureRequirements(swift::CanGenericSignature, llvm::function_ref<void (swift::GenericRequirement)> const&) + 220
08:42:27 10 swift-frontend           0x000000010431c1c4 swift::irgen::emitPolymorphicArguments(swift::irgen::IRGenFunction&, swift::CanTypeWrapper<swift::SILFunctionType>, swift::SubstitutionMap, swift::irgen::WitnessMetadata*, swift::irgen::Explosion&) + 344
08:42:27 11 swift-frontend           0x0000000102c4e69c (anonymous namespace)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite) + 3784
08:42:27 12 swift-frontend           0x0000000102b9e310 (anonymous namespace)::IRGenSILFunction::visitSILBasicBlock(swift::SILBasicBlock*) + 2788
08:42:27 13 swift-frontend           0x0000000105331fdc swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 11680
08:42:27 14 swift-frontend           0x0000000105af96b8 swift::irgen::IRGenerator::emitLazyDefinitions() + 4728
08:42:27 15 swift-frontend           0x00000001027598fc swift::performIRGeneration(swift::ModuleDecl*, swift::IRGenOptions const&, swift::TBDGenOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, llvm::GlobalVariable**) + 3020
08:42:27 16 swift-frontend           0x00000001054eda04 generateIR(swift::IRGenOptions const&, swift::TBDGenOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, swift::PrimarySpecificPaths const&, llvm::StringRef, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, llvm::GlobalVariable*&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>) + 260
08:42:27 17 swift-frontend           0x00000001054f56d4 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 1596
08:42:27 18 swift-frontend   

I was trying to archive iOS App. Using Xcode 15, But archiving is failing with following error

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):
08:42:27 0  swift-frontend           0x0000000102fadabc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
08:42:27 1  swift-frontend           0x0000000105c13cb0 llvm::sys::RunSignalHandlers() + 112
08:42:27 2  swift-frontend           0x000000010597d054 SignalHandler(int) + 352
08:42:27 3  libsystem_platform.dylib 0x000000018b142a24 _sigtramp + 56
08:42:27 4  swift-frontend           0x000000010238a26c swift::irgen::emitWitnessTableRef(swift::irgen::IRGenFunction&, swift::CanType, llvm::Value**, swift::ProtocolConformanceRef) + 264
08:42:27 5  swift-frontend           0x000000010238a26c swift::irgen::emitWitnessTableRef(swift::irgen::IRGenFunction&, swift::CanType, llvm::Value**, swift::ProtocolConformanceRef) + 264
08:42:27 6  swift-frontend           0x0000000102390020 swift::irgen::emitGenericRequirementFromSubstitutions(swift::irgen::IRGenFunction&, swift::GenericRequirement, swift::MetadataState, swift::SubstitutionMap, bool) + 312
08:42:27 7  swift-frontend           0x0000000101418f1c void llvm::function_ref<void (swift::GenericRequirement)>::callback_fn<(anonymous namespace)::EmitPolymorphicArguments::emit(swift::SubstitutionMap, swift::irgen::WitnessMetadata*, swift::irgen::Explosion&)::$_17>(long, swift::GenericRequirement) + 64
08:42:27 8  swift-frontend           0x0000000101419a48 void llvm::function_ref<void (swift::GenericRequirement)>::callback_fn<(anonymous namespace)::PolymorphicConvention::enumerateUnfulfilledRequirements(llvm::function_ref<void (swift::GenericRequirement)> const&)::$_8>(long, swift::GenericRequirement) + 212
08:42:27 9  swift-frontend           0x00000001042ee3e8 swift::irgen::enumerateGenericSignatureRequirements(swift::CanGenericSignature, llvm::function_ref<void (swift::GenericRequirement)> const&) + 220
08:42:27 10 swift-frontend           0x000000010431c1c4 swift::irgen::emitPolymorphicArguments(swift::irgen::IRGenFunction&, swift::CanTypeWrapper<swift::SILFunctionType>, swift::SubstitutionMap, swift::irgen::WitnessMetadata*, swift::irgen::Explosion&) + 344
08:42:27 11 swift-frontend           0x0000000102c4e69c (anonymous namespace)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite) + 3784
08:42:27 12 swift-frontend           0x0000000102b9e310 (anonymous namespace)::IRGenSILFunction::visitSILBasicBlock(swift::SILBasicBlock*) + 2788
08:42:27 13 swift-frontend           0x0000000105331fdc swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 11680
08:42:27 14 swift-frontend           0x0000000105af96b8 swift::irgen::IRGenerator::emitLazyDefinitions() + 4728
08:42:27 15 swift-frontend           0x00000001027598fc swift::performIRGeneration(swift::ModuleDecl*, swift::IRGenOptions const&, swift::TBDGenOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, llvm::GlobalVariable**) + 3020
08:42:27 16 swift-frontend           0x00000001054eda04 generateIR(swift::IRGenOptions const&, swift::TBDGenOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, swift::PrimarySpecificPaths const&, llvm::StringRef, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, llvm::GlobalVariable*&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>) + 260
08:42:27 17 swift-frontend           0x00000001054f56d4 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 1596
08:42:27 18 swift-frontend           0x00000001054f0f00 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 3020
08:42:27 19 swift-frontend           0x00000001054f4854 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 4568
08:42:27 20 swift-frontend           0x000000010555bd44 swift::mainEntry(int, char const**) + 4408
08:42:27 21 dyld                     0x000000018adbbf28 start + 2236
08:42:27 
08:42:27 error: compile command failed due to signal 11 (use -v to see invocation)
08:42:27 error: fatalError

Segmented Fault 11: error (Xcode 15)
 
 
Q