www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/17/02:44:37

Message-ID: <35874A6E.35CACD01@post.comstar.ru>
Date: Wed, 17 Jun 1998 08:47:42 +0400
From: Dim Zegebart <zager AT post DOT comstar DOT ru>
Reply-To: zager AT post DOT comstar DOT ru
Organization: Comstar Ltd.
MIME-Version: 1.0
To: jdh <neujdh AT ttuhsc DOT edu>
CC: djgpp AT delorie DOT com
Subject: Re: 16bit MS-Dos subsystem error
References: <35869570 DOT 11493968 AT news DOT ttu DOT edu>


jdh wrote:

> I compiled a very large program using djgpp.  It compiled with no
> errors.  When I ran it, however, I got the following error message:
>
> "16bit MS-DOS Subsystem
>
> DOS prompt mlink
> The NTVDM CPU has encountered an illegal instruction
> cs:0000  ip:0000  op:54 01 fb 1b 8b      "
>
> I am clueless.  I compiled the program in the Windows NT DOS-prompt
> shell thing.  If I try to run the program(s) on a straight DOS
> machine,  I get a segmentation fault message.
>

The most possible reason is what you write into memory behind
allocated area. This may happens, for example, then you try to
strcpy(s,foo_string)
and strlen(foo_string) greater then number of bytes you allocated for s.

This is so-called runtime error and it couldn't be detected at compile
time.
So, even if compiler reports no error you can't be 100% sure in good
results.

--
____ ____
|   \   /   Dim Zegebart
____/____

Moscow Russia
WWW - http://www.geocities.com/siliconvalley/pines/7817
DZcomm - comm library for Allegro
Palantir - multitasking kernel for Allegro (based on PDMLWP)


- Raw text -


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