Skip to content

rustc compiler crashed when using async in loop #67893

Closed
@fbucek

Description

@fbucek

When learning async/await feature I was struggling with running multiple tasks simultaneously.

Loop while let Some.... causes compiler to crash

https://github.com/fbucek/rust-async/blob/f6cc831c817a6b9d2f1c79182c5415b877f0da1e/actix-async/src/lib.rs#L30

Github Action crash output:

https://github.com/fbucek/rust-async/commit/f6cc831c817a6b9d2f1c79182c5415b877f0da1e/checks?check_suite_id=384856246

I expected to see this happen: Error message if something goes wrong.

Instead, this happened: Compiler crashed

Meta

Crash happens on macOS rustc 1.40 / Linux rustc 1.40 / Linux rustc 1.39 ( github actions )

rustc --version --verbose:

macOS

rustc 1.40.0 (73528e339 2019-12-16)
binary: rustc
commit-hash: 73528e339aae0f17a15ffa49a8ac608f50c6cf14
commit-date: 2019-12-16
host: x86_64-apple-darwin
release: 1.40.0
LLVM version: 9.0

Linux

rustc 1.40.0 (73528e339 2019-12-16)
binary: rustc
commit-hash: 73528e339aae0f17a15ffa49a8ac608f50c6cf14
commit-date: 2019-12-16
host: x86_64-unknown-linux-gnu
release: 1.40.0
LLVM version: 9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ICEBreaker-Cleanup-CrewHelping to "clean up" bugs with minimal examples and bisectionsP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions