The problem seem to trigger in this code in netplan.c function main().
'==>' marks line 269.

          fd_set          rd, wr, ex;     /* returned fd masks from select */
  [...]
          nclients = sizeof(fd_set)*8;                 /* max # of clients */
  ==>     client_list = allocate(nclients * sizeof(struct client));
          memset(client_list, 0, nclients * sizeof(struct client));

I have no sensible explanation why

  allocate(8 * sizeof(fd_set) * sizeof(struct client))

should fail, as it is just a simple wrapper around malloc().  The
client struct do not seem to be very large (unless NGROUPS_MAX is a
very large number suddenly), and fd_set is not very large either.

Can you try to apply this diff, to get the size of the memory
alloctaion printed, and run the program again:

--- netplan.c.~1.1.1.3.~        2005-02-19 12:07:34.000000000 +0100
+++ netplan.c   2005-11-03 09:44:04.913433546 +0100
@@ -266,6 +266,8 @@
                }
        }
        nclients = sizeof(fd_set)*8;                    /* max # of clients */
+       printf("Trying to call allocate(%d)\n",
+              nclients * sizeof(struct client));
        client_list = allocate(nclients * sizeof(struct client));
        memset(client_list, 0, nclients * sizeof(struct client));
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to