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 746667 - weird crash in vte_terminal_set_pty
weird crash in vte_terminal_set_pty
Status: RESOLVED OBSOLETE
Product: vte
Classification: Core
Component: general
0.39.x
Other Linux
: Normal critical
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-23 21:55 UTC by Christian Persch
Modified: 2020-04-28 07:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Persch 2015-03-23 21:55:59 UTC
From https://retrace.fedoraproject.org/faf/reports/595598/ :

_vte_terminal_setup_utf8 (inlined) 	1953
vte_terminal_set_pty 	12188
vte_terminal_spawn_sync 	3624

Now vte.c:1953 is 

 g_warning ("Failed to set UTF8 mode: %s\n", error->message);

which can only crash if error == NULL, and that can only happen if vte_pty_set_utf8() returns FALSE without setting @error, which can only happen if VTE_IS_PTY(pvt->pty) fails. But vte_terminal_set_pty has just assigned a reference of a VtePty to pvt->pty ...
Comment 1 Egmont Koblinger 2015-03-24 00:07:09 UTC
> which can only happen if VTE_IS_PTY(pvt->pty) fails

or if the subsequent "priv->pty_fd > 0" fails.  Shouldn't that be a ">="?
Comment 2 Christian Persch 2015-03-24 14:04:18 UTC
Unlikely that's the problem since I don't see how the pty could end up on FD 0, but I corrected the assertion to != -1 now.
Comment 3 Egmont Koblinger 2015-03-24 14:42:05 UTC
Maybe g-t was started without the 3 standard FDs. The next several FDs are X/Gtk sockets, urandom (for tls? or anyway?), completely out of our control when they are opened/closed.  I can imagine a complex scenario where this happened once for someone during the last 5 years (since this code had been there).  Dunno.
Comment 4 Christian Persch 2020-04-28 07:27:11 UTC
Not useful to leave this around; closing.