Comments (2)
Target: x86_64-apple-macosx14.0
I installed a trunk toolchain (with symbols) in an effort to build with the latest version of the compiler, but it's going through Rosetta (?) for some reason; I am on an Mac with Apple silicon.
The code still intermittently crashes (or suceeds) on the latest stable Xcode at the time of writing, but with (yet) another different stack dump. Luckily, there only seems to be one failure path here:
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
Stack dump: run_swift592.txt
Again, it could be an unrelated or since-solved issue, but I figured I'd note it anyways.
from swift.
No apparent non-determinism to the crash with a 8bb6846 compiler (although this still smells like a memory issue). Reduced example:
struct S<each A> {
let metatypes: (repeat (each A).Type)
init() {
self.metatypes = (repeat (each A).self)
}
}
let _ = S<Int, Bool>().metatypes
Stack dump:
0. Program arguments: bin/swift-frontend -debug-diagnostic-names -interpret /Users/mac/Desktop/test.swift
1. Swift version 5.11-dev (LLVM 87ace14daa2139a, Swift 8bb684628593220)
2. Compiling with the current language version
3. While evaluating request ASTLoweringRequest(Lowering AST to SIL for module test)
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 0x000000011586fad8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 40
1 swift-frontend 0x000000011586df25 llvm::sys::RunSignalHandlers() + 85
2 swift-frontend 0x000000011587012e SignalHandler(int) + 270
3 libsystem_platform.dylib 0x00007ff81bbae37d _sigtramp + 29
4 libsystem_platform.dylib 0x0000000000000001 _sigtramp + 18446603370115701921
5 swift-frontend 0x000000010ce50f4a swift::CanType::isActuallyCanonicalOrNull() const + 138
6 swift-frontend 0x000000010ce50e60 swift::CanType::CanType(swift::Type) + 32
7 swift-frontend 0x000000010ce50e2d swift::CanType::CanType(swift::Type) + 29
8 swift-frontend 0x000000010d5b81e4 swift::CanTypeWrapper<swift::TupleType>::getElementType(unsigned int) const + 52
9 swift-frontend 0x000000010ef58d86 getCanTupleElementType(swift::CanType, unsigned int) + 70
10 swift-frontend 0x000000010ef58af9 swift::Lowering::AbstractionPattern::getTupleElementType(unsigned int) const + 553
11 swift-frontend 0x000000010df4ada3 (anonymous namespace)::Transform::transform(swift::Lowering::RValue&&, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::AbstractionPattern, swift::CanType, swift::SILType, swift::Lowering::SGFContext) + 1875
12 swift-frontend 0x000000010df47947 swift::Lowering::SILGenFunction::emitTransformedValue(swift::SILLocation, swift::Lowering::RValue&&, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::AbstractionPattern, swift::CanType, swift::SILType, swift::Lowering::SGFContext) + 391
13 swift-frontend 0x000000010df4778e swift::Lowering::SILGenFunction::emitOrigToSubstValue(swift::SILLocation, swift::Lowering::RValue&&, swift::Lowering::AbstractionPattern, swift::CanType, swift::SILType, swift::Lowering::SGFContext) + 366
14 swift-frontend 0x000000010df475e8 swift::Lowering::SILGenFunction::emitOrigToSubstValue(swift::SILLocation, swift::Lowering::RValue&&, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::SGFContext) + 296
15 swift-frontend 0x000000010dee192a (anonymous namespace)::OrigToSubstComponent::translate(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::RValue&&, swift::Lowering::SGFContext) && + 266
16 swift-frontend 0x000000010dec4a43 swift::Lowering::TranslationPathComponent::get(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::ManagedValue, swift::Lowering::SGFContext) && + 227
17 swift-frontend 0x000000010decd55d swift::Lowering::SILGenFunction::emitLoadOfLValue(swift::SILLocation, swift::Lowering::LValue&&, swift::Lowering::SGFContext, bool) + 1757
18 swift-frontend 0x000000010de643e0 (anonymous namespace)::RValueEmitter::visitMemberRefExpr(swift::MemberRefExpr*, swift::Lowering::SGFContext) + 496
19 swift-frontend 0x000000010de53a90 swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 976
20 swift-frontend 0x000000010de44271 swift::Lowering::SILGenFunction::emitRValue(swift::Expr*, swift::Lowering::SGFContext) + 209
21 swift-frontend 0x000000010de44075 swift::Lowering::SILGenFunction::emitExprInto(swift::Expr*, swift::Lowering::Initialization*, std::__1::optional<swift::SILLocation>) + 357
22 swift-frontend 0x000000010de0f51f swift::Lowering::SILGenFunction::emitPatternBinding(swift::PatternBindingDecl*, unsigned int, bool)::$_0::operator()(swift::Expr*, swift::VarDecl*, bool, std::__1::unique_ptr<swift::Lowering::Initialization, std::__1::default_delete<swift::Lowering::Initialization>>&) const + 671
23 swift-frontend 0x000000010de0ef09 swift::Lowering::SILGenFunction::emitPatternBinding(swift::PatternBindingDecl*, unsigned int, bool) + 1481
24 swift-frontend 0x000000010de0f5f6 swift::Lowering::SILGenFunction::visitPatternBindingDecl(swift::PatternBindingDecl*, bool) + 150
25 swift-frontend 0x000000010de244e2 swift::ASTVisitor<swift::Lowering::SILGenFunction, void, void, void, void, void, void>::visit(swift::Decl*) + 1522
26 swift-frontend 0x000000010dfba9ea swift::Lowering::SILGenTopLevel::visitTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 714
27 swift-frontend 0x000000010dfba1ef swift::ASTVisitor<swift::Lowering::SILGenTopLevel, void, void, void, void, void, void>::visit(swift::Decl*) + 1391
28 swift-frontend 0x000000010dfb798d swift::Lowering::SILGenTopLevel::visitSourceFile(swift::SourceFile*) + 189
29 swift-frontend 0x000000010dfb6d68 swift::Lowering::SILGenModule::emitEntryPoint(swift::SourceFile*, swift::SILFunction*) + 1800
30 swift-frontend 0x000000010dfb999c swift::Lowering::SILGenModule::emitEntryPoint(swift::SourceFile*) + 316
31 swift-frontend 0x000000010dd394ab (anonymous namespace)::SILGenModuleRAII::emitSourceFile(swift::SourceFile*) + 91
32 swift-frontend 0x000000010dd3911e swift::ASTLoweringRequest::evaluate(swift::Evaluator&, swift::ASTLoweringDescriptor) const + 910
33 swift-frontend 0x000000010df96bae std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>> swift::SimpleRequest<swift::ASTLoweringRequest, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>> (swift::ASTLoweringDescriptor), (swift::RequestFlags)9>::callDerived<0ul>(swift::Evaluator&, std::__1::integer_sequence<unsigned long, 0ul>) const + 142
34 swift-frontend 0x000000010df96ac8 swift::SimpleRequest<swift::ASTLoweringRequest, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>> (swift::ASTLoweringDescriptor), (swift::RequestFlags)9>::evaluateRequest(swift::ASTLoweringRequest const&, swift::Evaluator&) + 40
35 swift-frontend 0x000000010dd56d0a llvm::Expected<swift::ASTLoweringRequest::OutputType> swift::Evaluator::getResultUncached<swift::ASTLoweringRequest>(swift::ASTLoweringRequest const&) + 330
36 swift-frontend 0x000000010dd39d88 llvm::Expected<swift::ASTLoweringRequest::OutputType> swift::Evaluator::operator()<swift::ASTLoweringRequest, (void*)0>(swift::ASTLoweringRequest const&) + 40
37 swift-frontend 0x000000010dd39c80 swift::performASTLowering(swift::ModuleDecl*, swift::Lowering::TypeConverter&, swift::SILOptions const&, swift::IRGenOptions const*) + 256
38 swift-frontend 0x000000010cfa040b swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 283
39 swift-frontend 0x000000010cfd1863 performAction(swift::CompilerInstance&, int&, swift::FrontendObserver*)::$_28::operator()(swift::CompilerInstance&) const + 147
40 swift-frontend 0x000000010cfd17bd bool llvm::function_ref<bool (swift::CompilerInstance&)>::callback_fn<performAction(swift::CompilerInstance&, int&, swift::FrontendObserver*)::$_28>(long, swift::CompilerInstance&) + 29
41 swift-frontend 0x000000010cfd0c81 llvm::function_ref<bool (swift::CompilerInstance&)>::operator()(swift::CompilerInstance&) const + 33
42 swift-frontend 0x000000010cfcfba8 withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool) + 392
43 swift-frontend 0x000000010cfc8286 performAction(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1222
44 swift-frontend 0x000000010cfa38a6 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 262
45 swift-frontend 0x000000010cfa228f swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2783
46 swift-frontend 0x000000010ce4f9ff run_driver(llvm::StringRef, llvm::ArrayRef<char const*>, llvm::ArrayRef<char const*>) + 2431
47 swift-frontend 0x000000010ce4e627 swift::mainEntry(int, char const**) + 1543
48 swift-frontend 0x000000010ce4dbd2 main + 34
49 dyld 0x00007ff81b7f83a6 start + 1942
Segmentation fault: 11
from swift.
Related Issues (20)
- Missing completion to static function of outer nominal HOT 1
- [LoadableByAddr] unchecked_bitwise_cast error. HOT 6
- [SourceKit] Unable to distinguish multiple inheritances separated by '&' as several inherited types
- LargeTypesReg2Mem: new compiler assertion when passing a C type to a Swift closure that's converted to a C function pointer HOT 3
- swift-frontend crashed in ModuleNameLookup<(anonymous namespace)::LookupByName>::lookupInModule HOT 1
- Assertion failed: ((!F || opTI->isABICompatibleWith(resTI, *F).isCompatible()) && "Can not convert in between ABI incompatible function types"), function create, file SILInstructions.cpp, line 2649. HOT 1
- Assertion failed: ((!replacement || replacement->hasError() || gp->isParameterPack() == replacement->is<PackType>()) && "replacement for pack parameter must be a pack type"), function operator(), file SubstitutionMap.cpp, line 237.
- Code fails to compile: extraneous ')' before ';'
- Discarding task group tasks are alive and running after successfully ending their scope HOT 3
- CollectionDifference.inferringMoves either behaves incorrectly or ambiguously HOT 7
- Crash using variadic generics in Xcode 15.3 Beta 3 / Swift 5.10 HOT 3
- `@discardableResult` works with `try` and `try!`, but not `try?` HOT 2
- constructing an object of class type X with a metatype value must use a 'required' initializer
- Labeled tuple with KeyPath expression as functions HOT 2
- Enabling library evolution breaks module aliasing
- Compiler does not propagate integer bounds information; misses bounds-check removal opportunities
- Compiler crash in pack iteration HOT 2
- Misleading error for expression pattern using enum HOT 1
- Building HandyJSON in Swift 5.10 throws a fatal error
- Compiler allows to use variable before its declaration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift.