Data races in generator
Moderate severity
GitHub Reviewed
Published
Aug 25, 2021
to the GitHub Advisory Database
•
Updated Jan 9, 2023
Withdrawn
This advisory was withdrawn on Aug 24, 2021
Description
Reviewed
Aug 18, 2021
Withdrawn
Aug 24, 2021
Published to the GitHub Advisory Database
Aug 25, 2021
Last updated
Jan 9, 2023
The
Generator
type is an iterable which uses a generator function that yieldsvalues. In affected versions of the crate, the provided function yielding values
had no
Send
bounds despite theGenerator
itself implementingSend
.The generator function lacking a
Send
bound means that types that aredangerous to send across threads such as
Rc
could be sent as part of agenerator, potentially leading to data races.
This flaw was fixed in commit
f7d120a3b
by enforcing that the generator function be bound by
Send
.References