root@libove.UUCP (The Super User) (06/16/88)
I have been playing with the sources to gnuchess version 2 as recently posted to comp.sources.games. I'm trying to get the program running on SCO Xenix 286 (Development System 2.1.4g) and... I have gotten through all of the infinite spill error problems in the usual roundabout simplification way, and I've split the source files in to: gnuchess.c became gcsplit[1234567].c and uxdsp.c became uxdsplit[123].c. Finally, everything compiles, but when I run the game, it crashes in the routine GetOpenings() in uxdsp.c, right after the mallocs: entry = (struct BookEntry *)malloc(sizeof(struct BookEntry)); mp = (unsigned short *)malloc((i+1)*sizeof(unsigned short)); The next line: entry->mv = mp; is the line causing the crash. I've checked that "entry" and "mp" are actually getting the memory they request; they are. (I have not checked if the sizeof() operators are returning anything sane however.) One last piece of information: the crash occurs the *first* time this part of the routine is entered; e.g. if you put a printf() statement right after the malloc()'s above, you'll see it just once, then core dump. Any help in getting this working would be appreciated (it compiled and ran fine under BSD 4.3). Thanks! -- Jay Libove Internet: libove@cs.cmu.edu libove@andrew.cmu.edu 5313 Ellsworth Avenue formtek!ditka!libove!libove@pt.cs.cmu.edu Pittsburgh, PA 15232 UUCP: cmucspt!formtek!ditka!libove!libove (412) 621-9649 cadre!pitt!darth!libove!libove