When executing monitor, special characters such as ", \ and others should be escaped properly. This used to be the case up to version 8.0.3, but with 8.1.0, commands such as echo 'foo"bar' and echo "foo\\" produce an incorrect monitor output of
+1746085153.283830 [0 127.0.0.1:55236] "echo" "foo"bar"
+1746085167.954618 [0 127.0.0.1:55236] "echo" "foo\"
whereas on 8.0.3, the same commands produced a correct monitor output of
+1746085205.816900 [0 127.0.0.1:55272] "echo" "foo\"bar"
+1746085206.927962 [0 127.0.0.1:55272] "echo" "foo\\"
A git bisect shows that this bug was introduced in commit cf1a1e0
The bug introduced in this commit is caused by the isprint(*p) returning a positive result for the " and \ characters such that the switch block inside the else block is never reached for those.
When executing
monitor, special characters such as",\and others should be escaped properly. This used to be the case up to version8.0.3, but with8.1.0, commands such asecho 'foo"bar'andecho "foo\\"produce an incorrect monitor output ofwhereas on
8.0.3, the same commands produced a correct monitor output ofA
git bisectshows that this bug was introduced in commit cf1a1e0The bug introduced in this commit is caused by the
isprint(*p)returning a positive result for the"and\characters such that the switch block inside the else block is never reached for those.