-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on invalid OSC 7 URL #2244
Comments
Yup, can replicate this, and seems like it is a VTE issue (tilix, xfce4 and terminator are using VTE) I was unable to find the issue on VTE repo, you may want to report it here: https://gitlab.gnome.org/GNOME/vte/-/issues Thanks! To make sure it's not a bug on tilix, I checked the gdb's backtrace, and SIGSEGV indeed happens in libvte...:
|
This is weird. In Terminator, the crash on the same kinds of URLs occurs within Terminator itself, as it's clear by the stack trace over there. VTE does absolutely no parsing or any other kind of work on the value of OSC 7. It's a just string. It notifies you when it changes (apparently this is what happens here) or lets you query it. That's all. If there was a related crash in VTE, it would crash on valid and invalid URLs equally. Trust me, I'm a VTE developer. Also note that quite a few other VTE-based apps which do use the value set by OSC 7, e.g. GNOME Terminal, work fine and do not crash. I'm not familiar with the D programming language and its surrounding infrastructure, but my best guess (without having thorougly investigated) is that for whatever reason the crashing method running in D doesn't show up in the stack trace. Although, the underlying GLib method that I believe actually crashes also doesn't show up while other GLib methods do. Really weird. Definitely needs further investigation. |
Stupid me here. The underlying GLib method doesn't crash. It returns a value that I believe should cause the D binding to generate an exception. That is, this GLib method should no longer be on the stack, this part is fine. And, in turn, maybe any other methods that don't catch the exception are also removed from the stack as the exception is getting propagated? |
There are 3 occurrences of |
FYI: GLib should accept hostnames beginning with a digit, this is tracked in https://gitlab.gnome.org/GNOME/glib/-/issues/3523. Looks like there's a good chance they'll fix it soon and then Tilix won't crash on such hostnames. Also, #2245 has just been reported, same kind of crash if a hostname (as given to Tilix in an OSC 7 sequence) contains an underscore character. That one is clearly invalid as hostname, so GLib surely won't be changed to accept that. Tilix definitely needs to tolerate faulty hostnames in an OSC 7. |
This causes a segfault:
Probably the same story as gnome-terminator/terminator#966 and https://gitlab.xfce.org/apps/xfce4-terminal/-/issues/345, although in Tilix you don't even need to split the layout, the crash (segfault) occurs immediately after encountering an OSC 7 sequence with an invalid hostname.
I presume the reason is the same, an uncaught exception in
URI.filenameFromUri()
, or somewhere nearby.The text was updated successfully, but these errors were encountered: