Uh oh!
There was an error while loading. Please reload this page.
Fixing memory exhaustion when formatting short code suggestion - #76598
Conversation
rust-highfive
commented
Sep 11, 2020
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @davidtwco (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Could you add a test in #76597 under src/test/ui ? |
ad-anssi
commented
Sep 11, 2020
Ok, I will try to add this this afternoon. |
estebank
commented
Sep 11, 2020
@bors r+ |
bors
commented
Sep 11, 2020
📌 Commit 62068a5 has been approved by |
…stebank Fixing memory exhaustion when formatting short code suggestion Details can be found in issue rust-lang#76597. This PR replaces substractions with `saturating_sub`'s to avoid usize wrapping leading to memory exhaustion when formatting short suggestion messages.
…stebank Fixing memory exhaustion when formatting short code suggestion Details can be found in issue rust-lang#76597. This PR replaces substractions with `saturating_sub`'s to avoid usize wrapping leading to memory exhaustion when formatting short suggestion messages.
…stebank Fixing memory exhaustion when formatting short code suggestion Details can be found in issue rust-lang#76597. This PR replaces substractions with `saturating_sub`'s to avoid usize wrapping leading to memory exhaustion when formatting short suggestion messages.
bors
commented
Sep 13, 2020
bors
commented
Sep 13, 2020
☀️ Test successful - checks-actions, checks-azure |
camelid
commented
Oct 2, 2020
I think it might be good to backport this to beta so it lands in 1.47. |
Mark-Simulacrum
commented
Oct 2, 2020
Approving unilaterally for beta backport -- looks like this only affects diagnostics, is a minimal patch, and will prevent another release with memory exhaustion on a fairly easily hittable case. cc @pnkfelix@nikomatsakis -- if you disagree, please let me know and we can back it out. |
…k-Simulacrum [beta] backports This backports a number of PRs to beta, not all of which have been approved (yet). * Switch to environment files to change the environment on GHA rust-lang#77418 * cache types during normalization rust-lang#76928 * Fixing memory exhaustion when formatting short code suggestion rust-lang#76598 * Issue 72408 nested closures exponential rust-lang#72412 r? `@Mark-Simulacrum`
Details can be found in issue #76597. This PR replaces substractions with
saturating_sub's to avoid usize wrapping leading to memory exhaustion when formatting short suggestion messages.