bors
8d5d9e0103
Auto merge of #8250 - pr2502:fix_repeat_underflow, r=giraffate
...
Fix underflow in `manual_split_once` lint
Hi, a friend found clippy started crashing on a suspiciously large allocation of `u64::MAX` memory on their code.
The mostly minimized repro is:
```rust
fn _f01(title: &str) -> Option<()> {
let _ = title[1..].splitn(2, '[').next()?;
Some(())
}
```
The underflow happens in this case on line 57 of the patch but I've changed the other substraction to saturating as well since it could potentially cause the same issue.
I'm not sure where to put a regression test, or if it's even worth for such a thing.
Aside, has it been considered before to build clippy with overflow checks enabled?
changelog: fix ICE of underflow in `manual_split_once` lint
2022-01-28 13:31:51 +00:00
..
2022-01-21 07:48:10 -06:00
2021-12-17 13:40:22 +01:00
2022-01-22 21:22:33 -05:00
2022-01-17 13:29:07 +01:00
2022-01-27 17:54:40 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-13 13:18:19 +01:00
2021-12-30 15:10:43 +01:00
2021-12-06 12:33:31 +01:00
2021-12-17 13:40:22 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2021-12-06 12:33:31 +01:00
2021-12-17 13:40:22 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-13 13:18:19 +01:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2022-01-21 13:10:19 +00:00
2021-12-30 15:10:43 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-22 21:22:33 -05:00
2022-01-22 21:22:33 -05:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 21:22:33 -05:00
2022-01-22 21:22:33 -05:00
2022-01-22 21:22:33 -05:00
2022-01-17 13:29:07 +01:00
2022-01-17 13:29:07 +01:00
2021-12-13 17:09:16 +00:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-17 13:29:07 +01:00
2021-12-06 12:33:31 +01:00
2022-01-17 13:29:07 +01:00
2022-01-17 13:29:07 +01:00
2022-01-13 13:18:19 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-17 13:29:07 +01:00
2022-01-13 13:18:19 +01:00
2022-01-17 13:29:07 +01:00
2022-01-17 13:29:07 +01:00
2022-01-17 13:29:07 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-09 09:22:06 +08:00
2022-01-09 09:22:06 +08:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-13 13:18:19 +01:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 21:22:33 -05:00
2021-12-06 12:33:31 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2022-01-22 12:27:57 +00:00
2022-01-22 12:27:57 +00:00
2022-01-23 20:31:27 +08:00
2022-01-23 20:31:27 +08:00
2022-01-23 20:31:27 +08:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-17 13:40:22 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-16 09:20:33 -08:00
2022-01-16 09:20:33 -08:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-17 13:29:07 +01:00
2022-01-17 13:29:07 +01:00
2022-01-17 13:29:07 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-21 09:43:41 -05:00
2022-01-12 20:57:50 -05:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-22 21:22:33 -05:00
2022-01-22 21:22:33 -05:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-22 21:22:33 -05:00
2022-01-22 21:22:33 -05:00
2022-01-22 21:22:33 -05:00
2022-01-17 13:29:07 +01:00
2022-01-17 13:29:07 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-12 20:57:50 -05:00
2022-01-12 20:57:50 -05:00
2021-12-06 12:33:31 +01:00
2022-01-12 20:57:50 -05:00
2022-01-12 20:57:50 -05:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-12 20:57:50 -05:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-17 11:04:46 -08:00
2021-12-12 12:34:21 +00:00
2021-12-12 12:34:21 +00:00
2022-01-20 13:38:48 +08:00
2022-01-20 13:38:48 +08:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2022-01-13 13:18:19 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-06 12:33:31 +01:00
2021-12-06 12:33:31 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-26 15:02:13 +08:00
2022-01-26 15:02:13 +08:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-17 13:40:22 +01:00
2021-12-31 21:13:07 -08:00
2021-12-31 21:13:07 -08:00
2021-12-31 21:13:07 -08:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2021-12-30 15:10:43 +01:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-22 20:35:32 -05:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00
2022-01-13 13:18:19 +01:00