pts@mendel.acc.Virginia.EDU (Paul T. Shannon) (01/19/91)
I have a much-used C program, about 4000 lines long, which I've ported from System V (Masscomp's RTU) to BSD 4.3 (NeXT). The program is for the control of psychophysical experiments; it's designed so that a new experiment is created by just re-writing one module, which then links into the unchanging parts of the program. I have a bizarre bug with the BSD version, compiled with NeXT's adaptation of gcc. The program runs flawlessly when run from a makefile, but it always fails (though in different ways) when run from a shell (either ksh or csh). 'Memory fault' is the reported error. gdb reports (in one instance) 'segmentation fault'. Each of the several versions of the program, used for quite different experiments, fails in different places (I've determined this by using gdb). None of these failure points show any sign of the usual dumb programming mistakes that dump core. And the programs run fine out of a makefile. I could go on and on with details about how the versions of this program fail. But I thought I'd ask the readers of this group, first, for any insight into make that might explain why my bug is hidden from view when the program runs from make. One last note. When I run the program from make, I run the program exhaustively, and not just for a limited test. Indeed, I've been forced to run hours of experiments from make because of this bug. In conclusion: does anyone know anything about how make works that might explain the behavior I see? - Paul Shannon pts@virginia.edu