After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789389 - indistinguisable patterns added to matcher table
indistinguisable patterns added to matcher table
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-24 08:42 UTC by Christian Persch
Modified: 2017-10-24 21:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (803 bytes, patch)
2017-10-24 12:08 UTC, Egmont Koblinger
committed Details | Review

Description Christian Persch 2017-10-24 08:42:30 UTC
I don't feel like investigating these now, so filing just for safekeeping:

$ VTE_DEBUG=parse ./vte-2.91
[...]
CSI J \e6  \c6  DEL'=> 'erase-in-display' and 'CSI J \e6  \c6  DEL'=> 'erase-in-display' are indistinguisable.
'\9b  J \de  \e6  \c6  DEL'=> 'erase-in-display' and '\9b  J \de  \e6  \c6  DEL'=> 'erase-in-display' are indistinguisable.
'CSI ? J \c6  DEL'=> 'selective-erase-in-display' and 'CSI ? J \c6  DEL'=> 'selective-erase-in-display' are indistinguisable.
'\9b  ? J \e6  \c6  DEL'=> 'selective-erase-in-display' and '\9b  ? J \e6  \c6  DEL'=> 'selective-erase-in-display' are indistinguisable.
'CSI K \e6  \c6  DEL'=> 'erase-in-line' and 'CSI K \e6  \c6  DEL'=> 'erase-in-line' are indistinguisable.
'\9b  K \de  \e6  \c6  DEL'=> 'erase-in-line' and '\9b  K \fd '=> 'erase-in-line' are indistinguisable.
'CSI ? K'=> 'selective-erase-in-line' and 'CSI ? K \c6  DEL'=> 'selective-erase-in-line' are indistinguisable.
'\9b  ? K'=> 'selective-erase-in-line' and '\9b  ? K'=> 'selective-erase-in-line' are indistinguisable.

No idea if they indicate a bug, or are just harmless.
Comment 1 Egmont Koblinger 2017-10-24 12:06:30 UTC
Apparently these have escape sequences both with and without %m in caps.cc, whereas %m stands for multiple (optionally 0) numbers. So obviously technically they conflict, while it doesn't cause any problems (it's always the same method they resolve to, and we've seen no reports about any of these escape sequences not being properly recognized).

Removing their non-%m versions seems to cause no harm, and the warning is gone.

Alternatively, we could go for %m requiring at least one number (and duplicating the remaining %m rules).

By the way, how did you get the list of bytes printed? They don't appear to me. Those '\e6 \c6 DEL' etc., sometimes the same on both sides while sometimes different, seems to be garbage to me (e.g. non-nul terminated string dumped as if it as nul-terminated), or am I missing something?
Comment 2 Egmont Koblinger 2017-10-24 12:08:26 UTC
Created attachment 362176 [details] [review]
fix
Comment 3 Christian Persch 2017-10-24 16:41:48 UTC
(In reply to Egmont Koblinger from comment #1)
> Apparently these have escape sequences both with and without %m in caps.cc,
> whereas %m stands for multiple (optionally 0) numbers. So obviously
> technically they conflict, while it doesn't cause any problems (it's always
> the same method they resolve to, and we've seen no reports about any of
> these escape sequences not being properly recognized).
> 
> Removing their non-%m versions seems to cause no harm, and the warning is
> gone.

That's probably the best solution. 

> By the way, how did you get the list of bytes printed? They don't appear to
> me. Those '\e6 \c6 DEL' etc., sometimes the same on both sides while
> sometimes different, seems to be garbage to me (e.g. non-nul terminated
> string dumped as if it as nul-terminated), or am I missing something?

Right, there was a bug there since the string isn't 0-terminated; fixed now.
Comment 4 Christian Persch 2017-10-24 16:42:19 UTC
Comment on attachment 362176 [details] [review]
fix

Thanks! :-)
Comment 5 Egmont Koblinger 2017-10-24 21:14:58 UTC
Comment on attachment 362176 [details] [review]
fix

C
Comment 6 Egmont Koblinger 2017-10-24 21:15:13 UTC
Committed.