Bug 1983633

Summary: coroutines miscompilation (fixed in 12.0.1)
Product: [Fedora] Fedora Reporter: Avi Kivity <avi.kivity>
Component: clangAssignee: Tom Stellard <tstellar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: airlied, jaruga, sbergman, sguelton, siddharth.kde, tstellar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: clang-12.0.1-1.fc34 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-12 01:06:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Avi Kivity 2021-07-19 09:53:20 UTC
Description of problem:


A C++ coroutine can sometimes "forget" a variable that it needs to keep across co_await calls. More details in [1].


Version-Release number of selected component (if applicable):

12.0.0-2.fc34


How reproducible:

Rarely, but extremely frustrating when it happens.


Steps to Reproduce:
1. See [1]

Actual results:


Value of variable is not kept across co_await calls.

Expected results:


Value of variable is kept across co_await calls.

Additional info:

[1] https://bugs.llvm.org/show_bug.cgi?id=48857

Was fixed in 13 and backported to 12.0.1.

Comment 1 Jun Aruga 2021-08-02 22:42:49 UTC
Are you working to upgrade clang to 12.0.1 on Fedora 34 rather than applying a patch to fix this issue, right?

I also want to see clang 12.0.1 on f34.
I hit an error "TAP parsing error" on ppc64le clang 12.0.0-2.fc34, that was fixed at clang 12.0.1 by the following commit. 
https://github.com/simd-everywhere/simde/issues/889
https://github.com/llvm/llvm-project/commit/04a68288ded459c7e76135a9ee4b7e9d4bf4cdc2

Comment 2 Jun Aruga 2021-08-02 22:47:40 UTC
> I hit an error "TAP parsing error" on ppc64le clang 12.0.0-2.fc34, that was fixed at clang 12.0.1 by the following commit. 

And this upstream ticket https://bugs.llvm.org/show_bug.cgi?id=49903 as a reference.

Thanks.

Comment 3 Fedora Update System 2021-08-10 23:07:32 UTC
FEDORA-2021-3162ece9f2 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-3162ece9f2

Comment 4 Fedora Update System 2021-08-11 01:02:44 UTC
FEDORA-2021-3162ece9f2 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-3162ece9f2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-3162ece9f2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-08-12 01:06:22 UTC
FEDORA-2021-3162ece9f2 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.