(Illustration by Gaich Muramatsu)
On Wed, Oct 13, 1999 at 11:47:35AM +0200, Daniel Schmitt wrote: > First try: > > Coda 5.3.1, set up according to the instructions in the HowTo. I was > unable to start a non-SCM server, while the SCM worked fine. This > problem was mentioned several times before on this mailing list, for > example on February 2nd and 3rd by Bernd Markgraf and on September > 10th by Alex Fomin. After toying around with this for a while, I > scrapped the installation and moved on to the... I haven't been ably to reproduce any problems regarding the failing non-SCM servers. But then again, maybe I'm doing something wrong. Now to trap that bug.... > #6 0x400b17bb in qsort (b=0xbffff220, n=4294967294, s=4, > cmp=0x80d1500 <cmpHost(long *, long *)>) at msort.c:114 Strange, # elements to sort (n) = 4294967294 (i.e. (unsigned long)-2) > #7 0x80d157a in vsgent::vsgent (this=0x8207d28, vsgaddr=3758096644, > hosts=0xbffff220, nh=-2) at vsg.cc:67 Ok, passed in number of hosts (nh) = -2 > #8 0x80d1bc2 in InitVSGDB () at vsg.cc:213 related code fragment... int i = sscanf(string, "%lx %s %s %s %s %s %s %s %s\n", &vsgaddr, Host[0], Host[1], Host[2], Host[3], Host[4], Host[5], Host[6], Host[7]); if (i == 0) break; /* number of hosts = i - 1 */ for (int j = 0; j < i - 1; j++){ he = gethostbyname(Host[j]); Haddr[j] = ntohl(*(unsigned long *)(he->h_addr)); } vsgent *newve = new vsgent(vsgaddr, Haddr, i-1); Ok, got it, the sscanf returns -1. Or EOF, which I would understand if the function was fscanf, not with sscanf. Could this be new behaviour in glibc2.1? In any case this error isn't picked up correctly as a terminating condition for the loop. Could you check whether adding or removing an empty line at the end of /vice/db/VSGDB works as a temporary fix? In any case the following change will probably fix the problem. Host[2], Host[3], Host[4], Host[5], Host[6], Host[7]); - if (i == 0) break; + if (i < 2) break; /* not enough fields read to create a vsg */ /* number of hosts = i - 1 */ for (int j = 0; j < i - 1; j++){ JanReceived on 1999-10-13 10:09:47