Subject: Re: bug#30794: Cannot produce backslash through hexadecimal - sed (GNU sed) 4.2.2

From: Jim Meyering <[email-masked]>
Date: Tue, 13 Mar 2018 21:45:55 -0700

On Tue, Mar 13, 2018 at 7:45 PM, Assaf Gordon <[email-masked]> wrote:
...
> Thank you for reporting this issue with such clear details
> and providing a bug fix - much appreciated!
>
> I expanded your fix by adding tests and news item, see attached patch.
>
> There is a small issue that this is a backwards incompatible change,
> and might break some exotic (bad) scripts.
>
> I'll wait for other opinions before pushing this.
>
> Jim,
> What do you think?

Thanks for the fine work from both of you.
Assaf, I think it's fair to extend the bound in the NEWS to say this:

  [Bug present since the beginning]

To conclude that, I ran the following on a modern system for which I
have built many old sed binaries.
Note that I dropped the "-E" and instead use a BRE, since -E and -r
were not present in the earlier releases.

$ for i in $(env ls -dv /p/p/sed-*); do printf '%-14s: ' $i; echo z |
$i/bin/sed 's/\(z\)/\x5c1/'; done|sed s/.....//    s:
sed-1.18 : x5c1
sed-2.05 : x5c1
sed-3.01 : x5c1
sed-3.02 : x5c1
sed-4.0a : z
sed-4.0b : z
sed-4.0c : z
sed-4.0d : z
sed-4.0e : z
sed-4.0.6: z
sed-4.0.7: z
sed-4.0.8: z
sed-4.0.9: z
sed-4.1  : z
sed-4.1c : z
sed-4.1d : z
sed-4.1e : z
sed-4.1f : z
sed-4.1.1: z
sed-4.1.2: z
sed-4.1.3: z
sed-4.1.4: z
sed-4.1.5: z
sed-4.2  : z
sed-4.2.1: z
sed-4.2.2: z
sed-4.3  : z
sed-4.4  : z