Re: gcc/informix 4gl running solaris getting segmentation faults
Posted in 1997
Could be a number of things. I would first try it using a different compiler, although I suspect this is not an option for you. Then I would make sure everything (including any forms that are referenced) are re-compiled and exist in accessible directories (Strangely enough, this has caused core-dumps for me, even though I believe a forms error should have been generated.) A couple of other things which have produced core dumps: 1) Returning an integer to a function expecting a smallint. 2) Accessing arrays out of bounds (They actually very often seem to work, especially in 4GL, but don't count on it.....To test this I wrote a test program which kept incrementing an array index in a loop. Even though the array only had 5 elements, the program executed properly through several hundred (750 or so, if I recall) iterations. A variation of this test-case demonstrated that even before the core was generated, the results were not reliable. You should probably give more information, though I suspect when you investigate further, you will find the cause of your core dump.....Does it always fail at exactly the same place? If it works when running through the debugger (or w/ RDS), it is probably a variable initialization problem. jpf wrote: > After compiling a 4ge with gcc compiler, getting core dump > during excecution of program. Does any one have any idea what the > problem > is? -- - Danny Wright danwright@bigfoot.com #include <stddisclaimers.h> * God is real, unless declared as an integer. * Why do programmers get Halloween and Christmas mixed up? Because 0CT(31) == DEC(25) * I'd love to change the world, but I can't get into the source code. * /nev/dull