-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Overflow in mpsc::Sender::clone
leads to illegal instruction
#35847
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
Comments
The well-known "optimized leak attack". |
Fix the same way as with Rc/Arc. |
Discussed today at @rust-lang/libs triage and the conclusion was that this'd be great to fix but isn't P-high priority b/c it's somewhat manufactured. As @brson said the fix will probably to just do the same thing as |
I'm looking into this, should I add a test for it? Because using the example provided in the issue description causes rustc to run for a loooooooooooooooooong time, and this would hurt PR turnover rates if I include the test. |
Also, why is |
@KiChjang yeah it's ok to omit a test in this case and also yeah I think it's fine to change to |
Fix illegal instruction caused by overflow in channel cloning Fixes #35847. r? @alexcrichton
The following crashes with an illegal instruction when compiled in release mode with
1.13.0-nightly (499484f56 2016-08-18)
oni686-unknown-linux-gnu
:It's presumably the result of the unchecked addition in
std::sync::mpsc::shared::Packet::clone_chan
. Another unchecked addition is performed instd::sync::mpsc::sync::Packet::clone_chan
, and other uses offetch_add
in thempsc
module should probably be audited as well.The text was updated successfully, but these errors were encountered: