From: pjfarley AT banet DOT net (Peter J. Farley III) Newsgroups: comp.os.msdos.djgpp Subject: SIGFPE causes bash 1.14.7 Invalid Page Exception Date: Thu, 09 Jul 1998 02:43:38 GMT Message-ID: <35a42993.4698410@news1.banet.net> NNTP-Posting-Host: 32.100.112.193 Organization: IBM.NET Lines: 78 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk [Posted and mailed to bash maintainer] I have been trying to configure and build perl 5.004 from the DJGPP sources (perl54s.zip), but when the Configure script tries to check whether large floats can be cast to int32 by gcc, the resulting program generates a SIGFPE and then bash crashes with a Win95 Invalid Page exception, address 00F7:3374, interrupts in service 2, 13. I believe a SIGFPE is generated because when I run the program under COMMAND.COM and test the DOS errorlevel variable, DOS reports the program returns errorlevel 3 (see tryit.bat below), and the only way to do that is for the program to get a SIGFPE (see the code). TIA for any help you can provide. Problem details: Operating environment: DJGPP V2.01, bash 1.14.7(2), gcc 2.7.2.1, Win95 DOS box, LFN=Y. bash version: GNU bash, version 1.14.7(2) r3.1 w/multibyte extension This is the program that Configure compiles and tries to execute: ============ try.c ==================== #include #include void blech() { exit(3); } main() { int i32; double f; int result = 0; signal(SIGFPE, blech); f = (double) 0x7fffffff; f = 10 * f; i32 = (int) f; if (i32 != (int) f) result |= 1; exit(result); } ============ try.c ==================== This is the compile command Configure uses: gcc -o try $ccflags try.c >/dev/null 2>&1 $ccflags has this value: -I/include -I/usr/local/include ============ tryit.bat ==================== try if errorlevel == 4 goto e4 if errorlevel == 3 goto e3 if errorlevel == 2 goto e2 if errorlevel == 1 goto e1 goto end :e1 echo errorlevel set to 1 goto end :e2 echo errorlevel set to 2 goto end :e3 echo errorlevel set to 3 goto end :e4 echo errorlevel set to 4 :end ============ tryit.bat ==================== ---------------------------------------------------- Peter J. Farley III (pjfarley AT nospam DOT dorsai DOT org OR pjfarley AT nospam DOT banet DOT net)