Mail Archives: djgpp/1998/06/17/02:44:37
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 -