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-12136] Using LAError causes swift 5.2 compiler to SEGFAULT #54571

Open
swift-ci opened this issue Feb 6, 2020 · 0 comments
Open

[SR-12136] Using LAError causes swift 5.2 compiler to SEGFAULT #54571

swift-ci opened this issue Feb 6, 2020 · 0 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Feb 6, 2020

Previous ID SR-12136
Radar rdar://58552618
Original Reporter torokzsolt (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee @slavapestov
Priority Medium

md5: 78fb7cc02a6f19366310b51b101a17ff

is duplicated by:

  • SR-12214 Swift 5.2 segmentation fault 11 with LocalAuthentication

Issue Description:

After updating to Xcode 11.4 and trying to build my application using swift 5.2 I started to get `Segmentation fault: 11` errors. As I investigated a bit more, I was able to reproduce the issue by using the following swift code:

import LocalAuthentication
print(LAError.biometryLockout)

Using 5.1.3 version of compiler it works just fine, but using 5.2 I get the following output:

Stack dump:
0.  Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -interpret test.swift -enable-objc-interop -stack-check -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -color-diagnostics -module-name test 
1.  Apple Swift version 5.2 (swiftlang-1103.0.22 clang-1103.0.22)
2.  While emitting SIL for getter for biometryLockout (in module 'LocalAuthentication')
3.  While silgen emitFunction SIL function "@$sSC7LAErrorLeV15biometryLockoutSoAAVvgZ".
 for getter for biometryLockout (in module 'LocalAuthentication')
0  swift                    0x000000010941b9b3 PrintStackTraceSignalHandler(void*) + 51
1  swift                    0x000000010941b170 SignalHandler(int) + 352
2  libsystem_platform.dylib 0x00007fff7068442d _sigtramp + 29
3  libsystem_platform.dylib 0x00007ffeeafb7900 _sigtramp + 2056467696
4  swift                    0x0000000105133a2f (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::SILFunctionType>, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImpl<swift::Lowering::ManagedValue>&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optional<swift::ForeignErrorConvention> const&, swift::ImportAsMemberStatus) && + 207
5  swift                    0x000000010513172b (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapper<swift::FunctionType>&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapper<swift::SILFunctionType>, llvm::Optional<swift::ForeignErrorConvention> const&, swift::ImportAsMemberStatus, llvm::SmallVectorImpl<swift::Lowering::ManagedValue>&, llvm::Optional<swift::SILLocation>&, swift::CanTypeWrapper<swift::FunctionType>&) + 1179
6  swift                    0x000000010512db48 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
7  swift                    0x000000010512a047 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
8  swift                    0x000000010520226f swift::Lowering::SILGenFunction::emitReturnExpr(swift::SILLocation, swift::Expr*) + 447
9  swift                    0x00000001051fdab6 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 12598
10 swift                    0x00000001051faac6 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 326
11 swift                    0x00000001051acb7f swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 1055
12 swift                    0x0000000105112149 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 953
13 swift                    0x00000001051108c7 swift::Lowering::SILGenModule::getFunction(swift::SILDeclRef, swift::ForDefinition_t) + 1335
14 swift                    0x0000000105206855 swift::Lowering::SILGenFunction::emitGlobalFunctionRef(swift::SILLocation, swift::SILDeclRef, swift::Lowering::SILConstantInfo, bool) + 485
15 swift                    0x0000000105132717 (anonymous namespace)::Callee::getFnValue(swift::Lowering::SILGenFunction&, bool, llvm::Optional<swift::Lowering::ManagedValue>) const & + 1239
16 swift                    0x000000010512dbd3 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3827
17 swift                    0x000000010513eeec swift::Lowering::SILGenFunction::emitGetAccessor(swift::SILLocation, swift::SILDeclRef, swift::SubstitutionMap, swift::Lowering::ArgumentSource&&, bool, bool, swift::Lowering::PreparedArguments&&, swift::Lowering::SGFContext, bool) + 924
18 swift                    0x00000001051c1753 (anonymous namespace)::GetterSetterComponent::get(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::ManagedValue, swift::Lowering::SGFContext) && + 275
19 swift                    0x00000001051bb9b3 swift::Lowering::SILGenFunction::emitLoadOfLValue(swift::SILLocation, swift::Lowering::LValue&&, swift::Lowering::SGFContext, bool) + 1027
20 swift                    0x0000000105182c39 swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 24265
21 swift                    0x00000001051f2c0b swift::Lowering::SILGenFunction::emitRValueAsOrig(swift::Expr*, swift::Lowering::AbstractionPattern, swift::Lowering::TypeLowering const&, swift::Lowering::SGFContext) + 571
22 swift                    0x0000000105196312 swift::Lowering::ManagedValue llvm::function_ref<swift::Lowering::ManagedValue (swift::Lowering::SGFContext)>::callback_fn<(anonymous namespace)::RValueEmitter::visitErasureExpr(swift::ErasureExpr*, swift::Lowering::SGFContext)::$_9>(long, swift::Lowering::SGFContext) + 98
23 swift                    0x000000010516acec void llvm::function_ref<void (swift::SILValue)>::callback_fn<swift::Lowering::SILGenFunction::emitExistentialErasure(swift::SILLocation, swift::CanType, swift::Lowering::TypeLowering const&, swift::Lowering::TypeLowering const&, llvm::ArrayRef<swift::ProtocolConformanceRef>, swift::Lowering::SGFContext, llvm::function_ref<swift::Lowering::ManagedValue (swift::Lowering::SGFContext)>, bool)::$_6>(long, swift::SILValue) + 412
24 swift                    0x0000000105152914 swift::Lowering::SILGenBuilder::bufferForExpr(swift::SILLocation, swift::SILType, swift::Lowering::TypeLowering const&, swift::Lowering::SGFContext, llvm::function_ref<void (swift::SILValue)>) + 148
25 swift                    0x0000000105168f4e swift::Lowering::SILGenFunction::emitExistentialErasure(swift::SILLocation, swift::CanType, swift::Lowering::TypeLowering const&, swift::Lowering::TypeLowering const&, llvm::ArrayRef<swift::ProtocolConformanceRef>, swift::Lowering::SGFContext, llvm::function_ref<swift::Lowering::ManagedValue (swift::Lowering::SGFContext)>, bool) + 1774
26 swift                    0x0000000105185ead swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 37181
27 swift                    0x000000010517cb83 swift::Lowering::SILGenFunction::emitExprInto(swift::Expr*, swift::Lowering::Initialization*, llvm::Optional<swift::SILLocation>) + 131
28 swift                    0x00000001050ff7ce swift::Lowering::ArgumentSource::forwardInto(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::Lowering::Initialization*, swift::Lowering::TypeLowering const&) && + 590
29 swift                    0x00000001051905e8 (anonymous namespace)::RValueEmitter::visitCollectionExpr(swift::CollectionExpr*, swift::Lowering::SGFContext) + 2360
30 swift                    0x0000000105125eab (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 5227
31 swift                    0x0000000105121513 (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 163
32 swift                    0x0000000105133cfe (anonymous namespace)::ArgEmitter::emitPreparedArgs(swift::Lowering::PreparedArguments&&, swift::Lowering::AbstractionPattern) + 238
33 swift                    0x0000000105133b79 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::SILFunctionType>, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImpl<swift::Lowering::ManagedValue>&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optional<swift::ForeignErrorConvention> const&, swift::ImportAsMemberStatus) && + 537
34 swift                    0x000000010513172b (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapper<swift::FunctionType>&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapper<swift::SILFunctionType>, llvm::Optional<swift::ForeignErrorConvention> const&, swift::ImportAsMemberStatus, llvm::SmallVectorImpl<swift::Lowering::ManagedValue>&, llvm::Optional<swift::SILLocation>&, swift::CanTypeWrapper<swift::FunctionType>&) + 1179
35 swift                    0x000000010512db48 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
36 swift                    0x000000010512a047 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
37 swift                    0x0000000105196e07 swift::Lowering::SILGenFunction::emitIgnoredExpr(swift::Expr*) + 823
38 swift                    0x000000010511cb1b swift::ASTVisitor<swift::Lowering::SILGenModule, void, void, void, void, void, void>::visit(swift::Decl*) + 1227
39 swift                    0x000000010511b86c swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*) + 1356
40 swift                    0x000000010511d94a swift::SILModule::constructSIL(swift::ModuleDecl*, swift::Lowering::TypeConverter&, swift::SILOptions&, swift::FileUnit*) + 1530
41 swift                    0x0000000104ced71b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 62699
42 swift                    0x0000000104c5e283 main + 1299
43 libdyld.dylib            0x00007fff7048b7fd start + 1
44 libdyld.dylib            0x000000000000000b start + 2411153423
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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.
Projects
None yet
Development

No branches or pull requests

1 participant