Re: Does GNOME work?



On Sun, 23 Aug 1998 04:44:32 -0400, chris+gnome@netmonger.net
<ChristopherMasto> wrote: 

>to compile, and when they do compile, to get them to run.  Code like
>this scares me (ORBit/src/IIOP/connection.c):
>
>  newfd = accept(GIOP_CONNECTION_GET_FD(connection), &sock, &n);
>  newcnx = GIOP_CONNECTION(iiop_connection_from_fd(newfd, IIOP_CONNECTION(connection)));
>  GIOP_CONNECTION(newcnx)->orb_data = connection->orb_data;
>
>There are two major opportunities there for failure leading to a null
>pointer dereference, and neither of them check for it.  In fact,
>iiop_connection_from_fd specifically returns NULL if it's been given
>an invalid fd (such as the -1 accept() returns on error).

iiop_connection_from_fd was supposed to g_assert() out if creating the
connection failed. 

Now that I've fixed that, _BOTH_ of those pointers are guaranteed to be !NULL
if that code is executed. 'connection' will not be NULL because a few lines
earlier 

>gnome-objc
>  all of the test programs bus error on startup

It sounds like you need a better compiler.

If you're using anything other than egcs 1.0.3 (or what came with RHL 5.1,
which is equivalent to 1.0.3 as far as patches go) you're asking for trouble,
especially for Objective C and C++ programs.

I'm also not sure what your Linux-specific complaint is about. If
Linux-specific features are used (which most of the time isn't the case)
because they are there and fit the need - if you wish to provide a way of
doing the same thing in a system-independant manner (like Martin Baulig has
done by creating libgtop for accessing system & process status data), we're
taking patches ;-)

-- Elliot
Progress (n.): The process through which Usenet has evolved from smart people
in front of dumb terminals to dumb people in front of smart terminals.  --
obs@burnout.demon.co.uk



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]