[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: GNAT DOS/NT bug]



I saw this on another mailing list.

Does this sound like a good application for GNAT/RTEMS? 

Anyone up to helping them out?

--joel

-------- Original Message --------
Subject: GNAT DOS/NT bug
Date: Thu, 12 Aug 1999 16:37:24 +1000
From: Rob Allen <rob at venus.it.swin.edu.au>
Reply-To: gnatlist at SEAS.GWU.EDU
To: gnatlist at SEAS.GWU.EDU

Delay statements crash NTVDM under NT4.0 sp3 using the GNAT DOS
compiler.  (repost from comp.lang.ada)

Specifically I am using EZ2LOAD, that is, GNAT3.10 DOS with DJGPP 2.01
(Why not the 3.11 Win32 GNAT?  Because I also want to run the code on a
486 to control a model railroad -- to teach real-time programming
including interrupt handling.  Am I wrong in this approach?)  The bug
shows up on Pentium Pros and IIs all running NT4.0sp3.

The problem is that at the end of delay statements (except delay 0.0)
the ntvdm produces illegal memory refs to 0xFFFFFFFF immediately
crashing the run whether running
the EXE directly or via the adacaps Run.
Specifically,
"ntvdm.exe - Application Error
The instruction at "0x0f003084" referenced memory at "0xffffffff".  The
memory could not be "read".
Click on OK to terminate ....
"

Is this a known bug?  Anyone else had experience with EZ2LOAD under NT ?

I have already posted this to comp.lang.ada and have had several helpful
replies.  Thankyou.
Someone said it is a known bug documented in ez2load.doc -- it isnt.
Also that non-tasking things work well.  Yes they do, namely conio_02,
Dosinter, dosports (both using the clock) and vgapck07.  (Svga02 fails
as expected.)

Thanks for any help you can give.  In the meantime I'll see about
installing gnat3.11-nt in our teaching labs and resign myself to having
duplicate low-level packages :-(
------- test program: ----------------
with Ada.Text_IO;  use Ada.Text_IO;
procedure Tstdelay is
begin
        Put_Line("about to delay...");
        delay 5.0;
        Put_Line("..after delay");
        Put("Press Enter to end");
        Skip_line;
end;
---------------- gnat310.bat  (note extra entry for ada_objects_path)
--------------------
@echo off
@rem already set in System Properties>Environment:
DJGPP=c:\apps\djgpp\djgpp.env ??
set DJGPP=c:\apps\djgpp201\djgpp.env
set PATH=C:\APPS\GNAT310\bin;%path%
set PATH=C:\APPS\GNAT310\gw-gnat;%path%
set TMPDIR=C:\APPS\GNAT310\tmp
set ADA_INCLUDE_PATH=C:\APPS\GNAT310\adainc
set ADA_OBJECTS_PATH=C:\APPS\GNAT310\lib;C:\APPS\GNAT310\lib\adalib
set GW-GNAT=C:\APPS\GNAT310\gw-gnat
@echo on
-----------------  partial djgpp.env (note extra entry for library path,
but I think it's irrelevant for ada ----
#= version 6/08/99 rka
#= Don't edit this line unless you move djgpp.env outside
#= of the djgpp installation directory.  If you do move
#= it, set DJDIR to the directory you installed DJGPP in.
#=
DJDIR=%:/>DJGPP%

+USER=dosuser
+TMPDIR=%DJDIR%/tmp
+EMU387=%DJDIR%/bin/emu387.dxe
+LFN=n

[bison]
BISON_HAIRY=%DJDIR%/lib/bison.hai
BISON_SIMPLE=%DJDIR%/lib/bison.sim

[cpp]
CPLUS_INCLUDE_PATH=%/>;CPLUS_INCLUDE_PATH%%DJDIR%/lang/cxx;%DJDIR%/include;%DJDIR%/contrib/grx20/include

C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/contrib/grx20/include

OBJCPLUS_INCLUDE_PATH=%/>;OBJCPLUS_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc

OBJC_INCLUDE_PATH=%/>;OBJC_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc

[gcc]
COMPILER_PATH=%/>;COMPILER_PATH%%DJDIR%/bin
LIBRARY_PATH=%/>;LIBRARY_PATH%%DJDIR%/lib;%DJDIR%/lib/gcc-lib\djgpp\2.81;%DJDIR%/contrib/grx20/lib

#= above line modified or NT4.0 by Rob Allen 5 Aug 99.  It was
#=LIBRARY_PATH=%/>;LIBRARY_PATH%%DJDIR%/lib;%DJDIR%/contrib/grx20/lib
etc etc
----------------
C:\Shared\1999rtp\Labs>path
PATH=C:\APPS\GNAT310\gw-gnat;C:\APPS\GNAT310\bin;C:\APPS\GNAT311\BIN;C:\WINNT\SY

STEM32;C:\WINNT;C:\PROGRA~1\MICROS~1\OFFICE;C:\WINNT\System32\WBEM;C:\VisualCafe

\BIN;C:\VisualCafe\JAVA\BIN;c:\djgpp\bin;c:\Home\bin;C:\BC5\BIN;

C:\Shared\1999rtp\Labs>
-- --------------------------------------------------
*********************************************************************************

Dr Rob Allen            Web: http://www.it.swin.edu.au/staff/rallen/
School of Information Technology    phone: +61 3 92148587
Swinburne University of Technology         Fax: +61 3 98190823
PO Box 218, Hawthorn, VICTORIA 3122 AUSTRALIA
EMail:RAllen at swin.edu.au
*********************************************************************************