Hi! > Le 19 août 2021 à 11:29, Dagobert Michelsen <[email protected]> a écrit : > > Hi Akim, > >> There remains one last check to make sure it's bison the binary that is >> wrong: >> >> LC_ALL=C ./src/bison ./tests/testsuite.dir/004/input.y 2>/tmp/log >> >> (src/bison, not tests/bison) >> >> But I'm pretty sure the \x00 is still not there, and it's going to painful >> to diagnose and fix :( Yet this rings some bell, I'll dive into the history >> to find something similar. > > Surprise! That one does contain \x00 and the above perl line works > like charm:
Wow... So that would be a problem with sed? Please use the attached input.y file for the following commands:
input.y.gz
Description: GNU Zip compressed data
mkdir dir
LC_ALL=C tests/bison input.y 2>dir/test.log
LC_ALL=C src/bison input.y 2>dir/src.log
LC_ALL=C perl -p -e 's{([\0\200\210\360\377])} {sprintf "\\x%02x", ord($1)}ge'
<src.log >dir/src.1.log
LC_ALL=C perl -p -e 's{([\000\200\210\360\377])}{sprintf "\\x%02x", ord($1)}ge'
<src.log >dir/src.2.log
LC_ALL=C perl -p -e 's{(\0|[\200\210\360\377])} {sprintf "\\x%02x", ord($1)}ge'
<src.log >dir/src.3.log
sed -e 's/foo/bar/g' <input.y >dir/sed.1.log
LC_ALL=C sed -e 's/foo/bar/g' <input.y >dir/sed.2.log
tar cf - dir | gzip >dir.tgz
Please send the zipped tarball (to make sure we don't lose the NUL byte because
of the mailers).
Thanks Dagobert!
