GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — diffutils: fix panic on non-UTF-8 argument ending in --width=N by SAY-5 · Pull Request #250 · uutils/diffutils Conversation
Contributor
Anchoring the regex ( Added a Fixes #247.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsSigned-off-by: Sai Asish Y <[email protected]>
|
There was an error while loading. Please reload this page.
Merging this PR will degrade performance by 3.06%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | cmd_cmp_gnu_equal[1000] |
23.2 µs | 24.9 µs | -6.67% |
| ❌ | cmd_cmp_release_equal[25000] |
24.8 µs | 26.2 µs | -5.32% |
| ❌ | cmd_cmp_release_equal[100] |
25.2 µs | 26.5 µs | -4.86% |
| ❌ | cmd_cmp_release_equal[10000] |
24.8 µs | 25.6 µs | -3.28% |
| ⚡ | cmd_diff_release_equal[1000] |
25.8 µs | 24.5 µs | +5.26% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing SAY-5:fix-width-non-utf8-panic (8c9a0b3) with main (860f6f4)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #250 +/- ## =========================== =========================== ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .cloned() | ||
| .peekable() | ||
| ) | ||
| ); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
please also add a case for xyz--width=5 being an operand, since the PR changes that behavior
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| #[test] | ||
| fn width_non_utf8_is_not_an_option() { | ||
| use std::os::unix::ffi::OsStringExt; | ||
| // A non-UTF-8 argument whose lossy form ends in `--width=N` must be |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
comment could be shorter, the test name already says most of it :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // treated as an operand, not parsed as the width option (which used to | ||
| // panic in `into_string().unwrap()`). | ||
| let bad = OsString::from_vec(b"\xff--width=5".to_vec()); | ||
| assert!(parse_params( |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
is_err() only works here because of the extra operand.
could you please pass bad and foo only and check that from == bad? that shows it is really treated as an operand
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Sai Asish Y <[email protected]>
|
all three done in 8c9a0b3: added the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
diff panics (into_string().unwrap()) on a non-UTF-8 argument ending in --width=N
There was an error while loading. Please reload this page.