delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/03/10:19:07

From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: strtod() crashes on the call strtod("$.", &endp);
Date: Sun, 03 May 1998 16:01:08 +0200
Organization: Lehrstuhl fuer Stroemungsmechanik
Lines: 49
Message-ID: <354C78A4.3ACEB613@LSTM.Ruhr-UNI-Bochum.De>
References: <354C3C00 DOT FD4900DB AT rogers DOT wave DOT ca>
NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Shaun Jackman wrote:
[...]
> 
> 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.
Hmm. 
Using

#include <stdlib.h>

int main(int argc, cahr **argv){
char *endp;

  strtod("$.", &endp);
  return 0;
}

I am unable to reproduce any SIGNAL. endp simply points
to the string constant. You might have blown up
something before, or are misinterpreting the backtrace,
which I do not understand.


-- 
Ciao
Tom

*************************************************************
* Thomas Demmer                                             *
* Lehrstuhl fuer Stroemungsmechanik                         *
* Ruhr-Uni-Bochum                                           *
* Universitaetsstr. 150                                     *
* D-44780  Bochum                                           *
* Tel: +49 234 700 6434                                     *
* Fax: +49 234 709 4162                                     *
* http://www.lstm.ruhr-uni-bochum.de/~demmer                *
*************************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019