www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/05/08/19:26:04

Date: Mon, 08 May 1995 18:17:53 -0400 (EDT)
From: sjagordo AT FLASH DOT LakeheadU DOT CA
Subject: exception 14 runtime error
To: djgpp AT sun DOT soe DOT clarkson DOT edu

I am in the process of making a series of modifications to a program
being used by a researcher not familiar with C.  The original program
was written a few years ago on a Unix workstation, and later ported to
the Borland and djgpp compilers by the original author (not me).  The
code is straight C, with no compiler-specific extensions.

My modified version compiles with Borland C++ (version 4.5) and with
djgpp (from the archive gcc263bn.zip), but the djgpp version always
crashes at runtime with the message:

	 Segmentation violation in pointer 0x00000000 at ...

Using "go32 -d edebug32", I get the message:

	exception 14 (0xe) occurred, error code=0

I have traced this in at least two cases.  The first occurs when the 
string argument to atof() is NULL.  The second occurs when a NULL pointer 
is dereferenced.  (Ultimately, these two errors are the same, since atof()
attempts to dereference the NULL argument to read the string).

When compiled with the Borland compiler, the program just runs right
through these sections.  In fact, atof((char *) NULL) returns 0.0
when compiled with Borland C++ 4.5.

Is there any way to configure djgpp to ignore this exception?  As I said,
the original version compiled under djgpp (I'm not sure which version of
gcc, but at least 2.5.x or earlier).  My modifications to the program 
have been limited to different source files--not the code where these 
exceptions are occuring.

Any advice on how to get a djgpp-compiled version running would be
appreciated.  The Borland-compiled version works, but the program is a
simulation tool, and the data sets are too large for the 640k boundary.

Thanks in advance,

Sandy Gordon.
sjagordo AT flash DOT lakeheadu DOT ca
sjagordo AT thunder DOT lakeheadu DOT ca


- Raw text -


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