--posix should disable the GNU regular expression escapes (\? \+ \| \w \s)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
Research direction
Start with fuzz/fuzz_targets/fuzz_sed.rs and the referenced KNOWN_ISSUES entry to understand the skipped --posix scenarios. Trace the --posix regular-expression handling, then verify that ?, +, |, \w, and \s behave as plain characters under --posix and that the corresponding fuzzer scenarios no longer need to be skipped.
Written by the indexing model from the issue text.
Description
Found by the differential fuzzer (fuzz/fuzz_targets/fuzz_sed.rs).
With --posix, GNU sed drops the GNU regular expression escapes: \?, \+,
\| are not operators and \w, \s are not classes, they all stand for the
plain character. We keep honoring them.
$ printf 'a\nb\n0?\n' | sed --posix -e '/a\+/d'
a
b
0?
$ printf 'a\nb\n0?\n' | ./target/release/sed --posix -e '/a\+/d'
b
0?
Same for the others:
| script | GNU --posix deletes |
we delete |
|---|---|---|
/0\?/d |
0? |
every line (empty match) |
/a\+/d |
nothing | a |
/a|b/d |
nothing | a and b |
/\w/d |
nothing | every line |
Until this is fixed the fuzzer skips these scenarios; see KNOWN_ISSUES in
fuzz/fuzz_targets/fuzz_sed.rs.
- Dominant language
- Rust
- Stars
- 110
- Forks
- 36
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 30
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uutils/sed
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
l command: the wrap width comes from the terminal size, and -l is ignoredPossibly taken @SichenLiang claimed this 43 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Back-references are rejected in byte (C locale) modePossibly taken @Omkar-Wagholikar claimed this 6 days ago. Opengood first issue
Difficulty 4/5 3-5 days Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
s/// replacement: implement the \U \L \u \l \E case-conversion escapesPossibly taken @dedsec-terminal claimed this 35 days ago. Opengood first issue
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
Similar issues
-
area:cli bug good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aaif-goose/goose#13031 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
meta.json, text.txt and try JSON are written non-atomicallyPossibly taken @qwertymuzaffar claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
qwertymuzaffar/parrot#47 ·
Maintainers usually reply within 1 day
-
priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
storytold/photocraft#8041 · 1 comment ·
Maintainers usually reply within 1 day