[SR-15240] async stack corruption when passing enums with associated values #57562
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
concurrency
Feature: umbrella label for concurrency language features
Environment
$ swiftc --version
Swift version 5.6-dev (LLVM a29f52d415422f3, Swift db90ea2)
Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
md5: 87a891916f6d0d016927266c747ddfcd
Issue Description:
the following test program should give each user “guest” permissions, but gives them “admin” permissions instead!
Removing the associated value from the `admin` case will instead give them `developer` permissions!
The problem does not occur when the async stream is replaced with a normal `for` loop. Removing the user index causes the program to crash with a segmentation fault instead.
Fortunately, this issue is not present in the RELEASE-5.5 binary, only in the nightlies.This issue is present in the 5.5-RELEASE toolchain. A modified reproduction is given below:
The text was updated successfully, but these errors were encountered: