From: Shaun Jackman Newsgroups: comp.os.msdos.djgpp Subject: strtod() crashes on the call strtod("$.", &endp); Date: Sun, 03 May 1998 02:42:25 -0700 Organization: ARC Technologies Lines: 39 Message-ID: <354C3C00.FD4900DB@rogers.wave.ca> NNTP-Posting-Host: pc-15794.bc.rogers.wave.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I have a program that is crashing within strtod(). I found it unusual that it would crash during a library function call. Maybe you somebody out there can shed some light on this. I'm writing a Forth compiler, and was testing it on this script: 1 if '1 == 1' $. 'Cool' $. then 0 if 'Uh oh' $. then Unfortunately, it crashes. I ran gdb on it, and after the crash got a stack frame back-trace. The result was: Program received signal SIGFPE, Arithmetic exception. 0x25df7 in strtod () (gdb) bt #0 0x25df7 in strtod () #1 0x18f9 in is_literal (lexema=0x7f111 "$.") at forth.c:62 #2 0x2285 in forth ( tp=0x7f114 " 'Cool' $. then 0 if 'Uh oh' $. then ") at forth.c:433 #3 0x1738 in main () #4 0x253e6 in __crt1_startup () (gdb) Which means it crashed on the call strtod("$.", &endp); I have no idea why. I am using gcc version 2.7.2.1 Thanks for your help, Please respond by e-mail as well if possible, Shaun Jackman