Date: Thu, 15 Feb 1996 14:47:47 -0800 (GMT) From: Orlando Andico To: DJGPP Mailing List Subject: Strange Errors Message-ID: MIME-Version: 1.0 Hi everyone: I have a strange error to relate. I got a copy of SUSAN (this is a low-level image-processing program). The author claims that it works under DJGPP (didn't specify the version though). I _have_ compiled it with GCC 2.6.3 under Solaris 2.3, and it works as advertised. However, using DJGPP 2.0 and GCC 2.7.2, the strangest errors occur. Here's the stack trace (compiled with gcc -g -o susan.exe susan.c -lm) Exiting due to signal SIGSEGV Page fault at eip=000106b1, error=0006 eax=000000af ebx=000107b0 ecx=00000010 edx=0005d1c0 esi=000107b0 edi=000005b0 ebp=00003474 esp=00003474 cs=00a7 ds=00af es=00af fs=008f gs=00bf ss=0033 Call frame traceback EIPs: 0x000106b1 ___djgpp_exception_table+281 Another odd thing: the above stack trace appeared only when I tried to do something (detect some edges off a PGM file). If I just type ``susan'' with no parameters (this is supposed to display some usage options), the usage gets displayed, as expected. HOWEVER: if I compile like this: gcc -Ox -o susan.exe susan.c -lm (I've tried optimization levels 2 and 3) *the program always bombs*. That is, even attempting to just print out the usage causes a segmentation fault similar to that I've included above. The fault always occurs in the ___dgjpp_exception_table thing (at varying offsets, due to the changing file size), whatever that is. The program seems to be a memory hog, but I have enough memory (16MB, 100MB+ of swap, CWSDPMI production(?) version). I've tried this on two computers, a P100 and a 486DX2-66, with the same results. Any ideas would be appreciated. -- Orly /--------------------------------------------------------------------------\ | Orlando A. Andico "I have no concept of time, other than | | oandico AT eee DOT upd DOT edu DOT ph it is flying." -- Alanis Morissette | \--------------------------------------------------------------------------/