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

Swift Compiler crash when building smart light example #29

Closed
nicolas-christe opened this issue Nov 21, 2024 · 3 comments
Closed

Swift Compiler crash when building smart light example #29

nicolas-christe opened this issue Nov 21, 2024 · 3 comments

Comments

@nicolas-christe
Copy link

I'm using toolchain swift-DEVELOPMENT-SNAPSHOT-2024-11-20-a-osx, esp-idf v5.2.3, esp-matter 1.3, and I have the following swift compiler crash when building smart-light example

0  swift-frontend           0x000000010aa152e8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  swift-frontend           0x000000010aa139cc llvm::sys::RunSignalHandlers() + 112
2  swift-frontend           0x000000010aa15944 SignalHandler(int) + 304
3  libsystem_platform.dylib 0x0000000185fc0184 _sigtramp + 56
4  libsystem_pthread.dylib  0x0000000185f8af70 pthread_kill + 288
5  libsystem_c.dylib        0x0000000185e97908 abort + 128
6  libsystem_c.dylib        0x0000000185e96c1c err + 0
7  swift-frontend           0x000000010ab20d20 swift::irgen::hasValidSignatureForEmbedded(swift::SILFunction*) (.cold.1) + 0
8  swift-frontend           0x0000000105316cd4 swift::irgen::IRGenerator::emitLazyDefinitions() + 3212
9  swift-frontend           0x0000000105431760 swift::IRGenRequest::evaluate(swift::Evaluator&, swift::IRGenDescriptor) const + 2632
10 swift-frontend           0x000000010547f8e0 swift::GeneratedModule swift::SimpleRequest<swift::IRGenRequest, swift::GeneratedModule (swift::IRGenDescriptor), (swift::RequestFlags)17>::callDerived<0ul>(swift::Evaluator&, std::__1::integer_sequence<unsigned long, 0ul>) const + 200
11 swift-frontend           0x0000000105439bc0 swift::IRGenRequest::OutputType swift::Evaluator::getResultUncached<swift::IRGenRequest, swift::IRGenRequest::OutputType swift::evaluateOrFatal<swift::IRGenRequest>(swift::Evaluator&, swift::IRGenRequest)::'lambda'()>(swift::IRGenRequest const&, swift::IRGenRequest::OutputType swift::evaluateOrFatal<swift::IRGenRequest>(swift::Evaluator&, swift::IRGenRequest)::'lambda'()) + 212
12 swift-frontend           0x0000000105432678 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**) + 1440
13 swift-frontend           0x0000000104f05b68 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>>>) + 272
14 swift-frontend           0x0000000104f02400 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*) + 1376
15 swift-frontend           0x0000000104f01a8c swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1228
16 swift-frontend           0x0000000104f0dde8 withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool) + 160
17 swift-frontend           0x0000000104f0372c performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 716
18 swift-frontend           0x0000000104f02df8 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2328
19 swift-frontend           0x0000000104cd7490 swift::mainEntry(int, char const**) + 3100
20 dyld                     0x0000000185c08274 start + 2840
@nicolas-christe
Copy link
Author

I can build this example successfully with the snapshot October 8, 2024.
I also tried the next one (from October 8, 2024) but its crashing

@nicolas-christe
Copy link
Author

I reduced the code example and found that the issue is when calling esp_matter.start. I commented out all the code and the crash is when calling esp_matter.start {_,_ in }

@kubamracek
Copy link
Collaborator

Resolved via #32

The compiler crash was resolved on the Swift compiler side, the latest swift.org downloadable toolchain should work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants