You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When -i is provided without an attached suffix, uutils/sed incorrectly consumes the subsequent positional argument (the sed expression) as the backup suffix. This causes the target filename to be evaluated as a sed script, resulting in parsing errors.
In GNU sed, the suffix for -i is optional and must be concatenated directly without whitespace
Reproduction Steps:
echo"foo"> test.txt
sed -i 's/foo/bar/' test.txt
Observed Output:
sed: <script argument 1>:1:1: error: undefined label `est.txt'Expected Output:Exit code 0, test.txt modified in-place with contents "bar", no backup file created.
I've diffed a working patch that addresses this in instances where I experienced it, which was primarily while building the kernel and potentially most gentoo ebuilds. I also stumbled upon another bug in fast_regex.rs while making a grub config with os-prober in use where NEEDS_FANCY_RE misinterprets multi-digit octal literals like \134 as back-references and aborts in byte mode. So both of these patches will be included.
These patches are AI assisted though, hence why I don't want to make a formal PR and just assume AI code contributions to any extent are accepted. But I would like to still share the fixes. there was another bug in fast_io.rs that prevented the full test suite from running, but I haven't run into a real world use-case where that actually mattered outside of the test suite, therefore I didn't investigate.
Activity
danktrapking-gif commentedon Sep 5, 2026
I've diffed a working patch that addresses this in instances where I experienced it, which was primarily while building the kernel and potentially most gentoo ebuilds. I also stumbled upon another bug in fast_regex.rs while making a grub config with os-prober in use where NEEDS_FANCY_RE misinterprets multi-digit octal literals like \134 as back-references and aborts in byte mode. So both of these patches will be included.
These patches are AI assisted though, hence why I don't want to make a formal PR and just assume AI code contributions to any extent are accepted. But I would like to still share the fixes. there was another bug in fast_io.rs that prevented the full test suite from running, but I haven't run into a real world use-case where that actually mattered outside of the test suite, therefore I didn't investigate.
uutils-sed-fixes.patch