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 126554 - vte doesn't work on NetBSD/sparc-1.5
vte doesn't work on NetBSD/sparc-1.5
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.11.x
Other All
: Normal major
: ---
Assigned To: VTE Maintainers
Nalin Dahyabhai
Depends on:
Blocks:
 
 
Reported: 2003-11-09 13:31 UTC by Adrian Bunk
Modified: 2005-08-15 01:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (710 bytes, patch)
2004-12-05 22:05 UTC, Dan Winship
none Details | Review
Corrected patch (655 bytes, patch)
2005-08-05 00:01 UTC, Rich Edelman
none Details | Review

Description Adrian Bunk 2003-11-09 13:31:10 UTC
$ vte

** (vte:16110): WARNING **: Error setting PTY size: Bad file descriptor.

** (vte:16110): WARNING **: Error reading PTY size, using defaults: Bad
file descriptor.

(vte:16110): GLib-WARNING **: giounix.c:397:g_io_unix_get_flags()Error
while getting flags for FD: Bad file descriptor (9)


(vte:16110): GLib-WARNING **: giounix.c:397:g_io_unix_get_flags()Error
while getting flags for FD: Bad file descriptor (9)


** (vte:16110): WARNING **: Error reading PTY size, using defaults: Bad
file descriptor.

** (vte:16110): WARNING **: Error setting PTY size: Bad file descriptor.

** (vte:16110): WARNING **: Error reading PTY size, using defaults: Bad
file descriptor.
Detected child exit.
$
Comment 1 alexander.winston 2004-01-27 18:53:02 UTC
Adding the portability keyword.
Comment 2 Dan Winship 2004-12-05 22:05:42 UTC
Created attachment 34518 [details] [review]
patch

The problem is in gnome-pty-helper. It assumes that CMSG_DATA() points to
the byte immediately after the end of the struct cmsghdr, but if you look
at sys/socket.h, you'll see it actually adds padding in some cases to make
CMSG_DATA be longword-aligned.

On Linux, cmsghdr is 12 bytes long on 32bit platforms and 16 bytes long on
64bit platforms, so there never ends up being any padding. But on NetBSD,
you do end up with padding on some architectures (including Sparc apparently,
and anything 64bit).

The attached patch fixes the definition of CONTROLLEN to take the padding
into account.
Comment 3 Kjartan Maraas 2005-02-15 09:01:44 UTC
Adrian, can you confirm that this patch fixes the problem for you?
Comment 4 Adrian Bunk 2005-02-15 09:39:54 UTC
Unfortunately, I do no longer have access to any NetBSD machines.
Comment 5 Rich Edelman 2005-08-04 21:41:17 UTC
Ah, this bug affects OpenBSD 3.7 and -current on macppc as well. That happens to
be what I'm running and how I found this bug. I'll download the patch and apply
it tonight, will update with my results later.
Comment 6 Rich Edelman 2005-08-05 00:01:37 UTC
Created attachment 50250 [details] [review]
Corrected patch

Originally proposed patch doesn't work... need to set CONTROLLEN to a value
before malloc()ing based on it. :)  Swapped those two lines, however, and all
works great! Gnome-terminal no longer crashes due to vte. I have recreated the
patch and attached here. Patch is against 0.11.12.
Comment 7 Kjartan Maraas 2005-08-13 11:58:18 UTC
Commited this. Will be in 0.11.15. Thanks to everyone involved in tracking down
this problem.