[Petter Reinholdtsen] > Can you try to apply this diff, to get the size of the memory > alloctaion printed, and run the program again:
Doh. No need. I see from the backtrace, that the number is very large (268517376). Hm, could this be a signed/unsigned issue? Try to apply this patch and see if the problem goes away: --- netplan.c.~1.1.1.3.~ 2005-02-19 12:07:34.000000000 +0100 +++ netplan.c 2005-11-03 09:51:56.362527361 +0100 @@ -87,9 +87,9 @@ const char *arg); void logger(char *, ...); -void *allocate(int n) +void *allocate(size_t n) {void *p = malloc(n); if (!p) fatal("no memory"); return(p);} -void *reallocate(void *o, int n) +void *reallocate(void *o, size_t n) {void *p = o ? realloc(o, n) : malloc(n); if (!p) fatal("no memory"); return(p);} void release(void *p) Malloc takes size_t as an argument, not int. It would also be great if you could try to apply this patch, and report the output when running netplan as before. --- netplan.c.~1.1.1.3.~ 2005-02-19 12:07:34.000000000 +0100 +++ netplan.c 2005-11-03 09:54:23.963155116 +0100 @@ -266,6 +266,8 @@ } } nclients = sizeof(fd_set)*8; /* max # of clients */ + printf("sizeof(fd_set)=%d, sizeof(struct client)=%d, NGROUPS_MAX=%d\n", + sizeof(fd_set),sizeof(struct client), NGROUPS_MAX); 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]