-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Coroutines can be assumed to be 'static
despite the resume arg not being such.
#132104
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-coroutines
Area: Coroutines
C-bug
Category: This is a bug.
F-coroutines
`#![feature(coroutines)]`
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
requires-nightly
This issue requires a nightly compiler in some way.
Comments
Reduced a bit:
|
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 28, 2024
…utlives, r=spastorino Ensure that resume arg outlives region bound for coroutines When proving that `{Coroutine}: 'region`, we must also prove that the coroutine's resume ty outlives that region as well. See the inline comment. Fixes rust-lang#132104
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Oct 29, 2024
…utlives, r=spastorino Ensure that resume arg outlives region bound for coroutines When proving that `{Coroutine}: 'region`, we must also prove that the coroutine's resume ty outlives that region as well. See the inline comment. Fixes rust-lang#132104
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Oct 29, 2024
…utlives, r=spastorino Ensure that resume arg outlives region bound for coroutines When proving that `{Coroutine}: 'region`, we must also prove that the coroutine's resume ty outlives that region as well. See the inline comment. Fixes rust-lang#132104
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 29, 2024
Rollup merge of rust-lang#132151 - compiler-errors:coroutine-resume-outlives, r=spastorino Ensure that resume arg outlives region bound for coroutines When proving that `{Coroutine}: 'region`, we must also prove that the coroutine's resume ty outlives that region as well. See the inline comment. Fixes rust-lang#132104
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-coroutines
Area: Coroutines
C-bug
Category: This is a bug.
F-coroutines
`#![feature(coroutines)]`
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
requires-nightly
This issue requires a nightly compiler in some way.
I tried this code:
I expected to see this happen:
Compilation error because
'not_static : 'static
would be needed for thatspawn()
(orAny
) to pass.Instead, this happened:
No compilation error, thus unsoundness ensues (coroutine prints
UAF
in the current playground, thereby proving it is reading unrelated/UAF memory. Miri reports UB).Meta
rustc --version --verbose
:@rustbot label +I-unsound +A-coroutines +F-coroutines +F-coroutine_trait +requires-nightly
The text was updated successfully, but these errors were encountered: