Skip to content

[SR-15200] Returning eventLoop.future<T?, U?>(nil, nil) from ELF.flatMap(_:) causes memory lifetime verifier failure #57522

@gwynne

Description

@gwynne
Previous ID SR-15200
Radar rdar://problem/83190880
Original Reporter @gwynne
Type Bug
Status Resolved
Resolution Done
Environment
Swift version 5.5-dev (LLVM 27ee1ffec3b6967, Swift c7dd41bf2c475d0)
Target: x86_64-unknown-linux-gnu
Linux ubuntu 5.11.0-1016-aws #&#8203;17~20.04.1-Ubuntu SMP Thu Aug 12 05:39:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee @eeckstein
Priority Medium

md5: ce5a1a391a7f060cb7e032d966aaa304

Issue Description:

Partial redacted compiler output:

SIL memory lifetime failure in @$s3App13FooControllerV9createFoo3req7NIOCore15EventLoopFutureCy8NIOHTTP118HTTPResponseStatusOG5Vapor7RequestC_tKFAHyAA20ModelAAExternalInputCSg_AA012ModelBBBBBBBrS0CSgtGAUcfU5_: memory is initialized, but shouldn't
memory location:   %26 = alloc_stack $(Optional<ModelBBBBBBBExternalInput>, Optional<ModelAAExternalInput>) // users: %40, %39, %27
at instruction:   dealloc_stack %26 : $*(Optional<ModelBBBBBBBExternalInput>, Optional<ModelAAExternalInput>) // id: %40
<snip>
1.  Swift version 5.5-dev (LLVM 27ee1ffec3b6967, Swift c7dd41bf2c475d0)
2.
3.  Contents of /tmp/TemporaryDirectory.5Hlpso/sources-1:
<snip>
4.  While evaluating request ASTLoweringRequest(Lowering AST to SIL for file "/home/ubuntu/foo/Sources/App/Controllers/FooController.swift")

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of software

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions