comp.lang.ada
 help / color / mirror / Atom feed
* Re: Invalid page fault with gnat304a on Win95
  1996-10-01  0:00 Invalid page fault with gnat304a on Win95 Vinicius Fernando Arcaro
@ 1996-10-01  0:00 ` Sune Falck
  1996-10-04  0:00   ` Jeff Creem
  1996-10-02  0:00 ` Nikolay P. Vasilyev
  1 sibling, 1 reply; 6+ messages in thread
From: Sune Falck @ 1996-10-01  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]




Vinicius Fernando Arcaro <vfa@turing.unicamp.br> skrev i inl�gg
<19961001002056.aaaa000RR@babyblue.cs.yale.edu>...
> Dear gnat user:
> 
>     This program runs correctly only with maxn less than 93, 
> otherwise it runs into a page fault. Is there a way to use a
> maxn greater than 92? I am compiling and linking through
> gnatmake test.adb
> 
> procedure test is
> 
>   maxn : constant integer := 93;
>   a    : array (1 .. maxn, 1 .. maxn) of long_float;
> 
> begin
>   for i in 1 .. maxn loop
>     for j in 1 .. maxn loop
>       a(i,j) := 0.0;
>     end loop;
>   end loop;
> end test;
> 

Your program needs 93*93*8 =  69192 bytes, in hex 10E48 on the
stack and the default value for the committed stack size in hex is 10000 
Try to increase the stack size 

With microsoft tool editbin - 

C:\tmp>h:\dev\msdev\bin\editbin  /stack:100000,100000 c:\tmp\test.exe
Microsoft (R) COFF Binary File Editor Version 3.00.5270
Copyright (C) Microsoft Corp 1992-1995. All rights reserved.

After this change your program runs just fine.
 
One can give gnatmake options to the linker in the following way that
also gives a working program.

C:\tmp>gnatmake test -largs -Xlinker  -stack -Xlinker 100000,20000
gnatbind -x test.ali
gnatlink -Xlinker -stack -Xlinker 100000,20000 test.ali

C:\tmp>test

Runs fine with a committed stack size of 20000

The mysterious -Xlinker options is there to make gcc
pass the argument "-stack 100000,20000" to the
linker.

-- 
Sune Falck       mailto:Sune.Falck@abc.se
Stavshaellsv 5, S-146 54 Tullinge, SWEDEN








^ permalink raw reply	[flat|nested] 6+ messages in thread

* Invalid page fault with gnat304a on Win95
@ 1996-10-01  0:00 Vinicius Fernando Arcaro
  1996-10-01  0:00 ` Sune Falck
  1996-10-02  0:00 ` Nikolay P. Vasilyev
  0 siblings, 2 replies; 6+ messages in thread
From: Vinicius Fernando Arcaro @ 1996-10-01  0:00 UTC (permalink / raw)



Dear gnat user:

    This program runs correctly only with maxn less than 93, 
otherwise it runs into a page fault. Is there a way to use a
maxn greater than 92? I am compiling and linking through
gnatmake test.adb

procedure test is

  maxn : constant integer := 93;
  a    : array (1 .. maxn, 1 .. maxn) of long_float;

begin
  for i in 1 .. maxn loop
    for j in 1 .. maxn loop
      a(i,j) := 0.0;
    end loop;
  end loop;
end test;

TEST caused an invalid page fault in
module TEST.EXE at 0137:004012e1.
Registers:
EAX=015700b0 CS=0137 EIP=004012e1 EFLGS=00010206
EBX=00550000 SS=013f ESP=0154efcc EBP=0155fe1c
ECX=00401090 DS=013f ESI=815a1b70 FS=0d4f
EDX=00401078 ES=013f EDI=8159baf0 GS=0000
Bytes at CS:EIP:
c7 85 b4 f1 fe ff 01 00 00 00 83 bd b4 f1 fe ff 
Stack dump:

Thank you in advance,
Vinicius Fernando Arcaro
E-mail: vfa@turing.unicamp.br




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Invalid page fault with gnat304a on Win95
@ 1996-10-01  0:00 Vinicius Fernando Arcaro
  0 siblings, 0 replies; 6+ messages in thread
From: Vinicius Fernando Arcaro @ 1996-10-01  0:00 UTC (permalink / raw)



Dear gnat user:

    This program runs correctly only with maxn less than 93, 
otherwise it runs into a page fault. Is there a way to use a
maxn greater than 92? I am compiling and linking through
gnatmake test.adb

procedure test is

  maxn : constant integer := 93;
  a    : array (1 .. maxn, 1 .. maxn) of long_float;

begin
  for i in 1 .. maxn loop
    for j in 1 .. maxn loop
      a(i,j) := 0.0;
    end loop;
  end loop;
end test;

TEST caused an invalid page fault in
module TEST.EXE at 0137:004012e1.
Registers:
EAX=015700b0 CS=0137 EIP=004012e1 EFLGS=00010206
EBX=00550000 SS=013f ESP=0154efcc EBP=0155fe1c
ECX=00401090 DS=013f ESI=815a1b70 FS=0d4f
EDX=00401078 ES=013f EDI=8159baf0 GS=0000
Bytes at CS:EIP:
c7 85 b4 f1 fe ff 01 00 00 00 83 bd b4 f1 fe ff 
Stack dump:

Thank you in advance,
Vinicius Fernando Arcaro
E-mail: vfa@turing.unicamp.br




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Invalid page fault with gnat304a on Win95
  1996-10-01  0:00 Invalid page fault with gnat304a on Win95 Vinicius Fernando Arcaro
  1996-10-01  0:00 ` Sune Falck
@ 1996-10-02  0:00 ` Nikolay P. Vasilyev
  1 sibling, 0 replies; 6+ messages in thread
From: Nikolay P. Vasilyev @ 1996-10-02  0:00 UTC (permalink / raw)



In message <19961001002056.aaaa000RR@babyblue.cs.yale.edu> - Vinicius Fernando
Arcaro <vfa@turing.unicamp.br> writes:

 >Dear gnat user:
 >
 >    This program runs correctly only with maxn less than 93, 
 >otherwise it runs into a page fault. Is there a way to use a
 >maxn greater than 92? I am compiling and linking through
 >gnatmake test.adb
 >
 >procedure test is
 >
 >  maxn : constant integer := 93;
 >  a    : array (1 .. maxn, 1 .. maxn) of long_float;
 >
 >begin
 >  for i in 1 .. maxn loop
 >    for j in 1 .. maxn loop
 >      a(i,j) := 0.0;
 >    end loop;
 >  end loop;
 >end test;
 >
 >TEST caused an invalid page fault in
 >module TEST.EXE at 0137:004012e1.
 >Registers:
 >EAX=015700b0 CS=0137 EIP=004012e1 EFLGS=00010206
 >EBX=00550000 SS=013f ESP=0154efcc EBP=0155fe1c
 >ECX=00401090 DS=013f ESI=815a1b70 FS=0d4f
 >EDX=00401078 ES=013f EDI=8159baf0 GS=0000
 >Bytes at CS:EIP:
 >c7 85 b4 f1 fe ff 01 00 00 00 83 bd b4 f1 fe ff 
 >Stack dump:

I think you must somewhere point out that you want stack size more than
default (8K).





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Invalid page fault with gnat304a on Win95
  1996-10-01  0:00 ` Sune Falck
@ 1996-10-04  0:00   ` Jeff Creem
  1996-10-04  0:00     ` Robert A Duff
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Creem @ 1996-10-04  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2096 bytes --]


In article <01bbafc6$020b48e0$LocalHost@sfnp04h>, "Sune Falck"
<Sune.Falck@abc.se> wrote:

> Vinicius Fernando Arcaro <vfa@turing.unicamp.br> skrev i inl�gg
> <19961001002056.aaaa000RR@babyblue.cs.yale.edu>...
> > Dear gnat user:
> > 
> >     This program runs correctly only with maxn less than 93, 
> > otherwise it runs into a page fault. Is there a way to use a
> > maxn greater than 92? I am compiling and linking through
> > gnatmake test.adb
> > 
> > procedure test is
> > 
> >   maxn : constant integer := 93;
> >   a    : array (1 .. maxn, 1 .. maxn) of long_float;
> > 
> > begin
> >   for i in 1 .. maxn loop
> >     for j in 1 .. maxn loop
> >       a(i,j) := 0.0;
> >     end loop;
> >   end loop;
> > end test;
> > 
> 
> Your program needs 93*93*8 =  69192 bytes, in hex 10E48 on the
> stack and the default value for the committed stack size in hex is 10000 
> Try to increase the stack size 
> 
> With microsoft tool editbin - 
> 
> C:\tmp>h:\dev\msdev\bin\editbin  /stack:100000,100000 c:\tmp\test.exe
> Microsoft (R) COFF Binary File Editor Version 3.00.5270
> Copyright (C) Microsoft Corp 1992-1995. All rights reserved.
> 
> After this change your program runs just fine.
>  
> One can give gnatmake options to the linker in the following way that
> also gives a working program.
> 
> C:\tmp>gnatmake test -largs -Xlinker  -stack -Xlinker 100000,20000
> gnatbind -x test.ali
> gnatlink -Xlinker -stack -Xlinker 100000,20000 test.ali
> 
> C:\tmp>test
> 
> Runs fine with a committed stack size of 20000
> 
> The mysterious -Xlinker options is there to make gcc
> pass the argument "-stack 100000,20000" to the
> linker.
> 
> -- 
> Sune Falck       mailto:Sune.Falck@abc.se
> Stavshaellsv 5, S-146 54 Tullinge, SWEDEN



I think the above will work but for something not quit that ugly you
could have the test code run out of the context of a task. Define the
task as a task type and set the 'Storage_Size of the task type to the
appropriate value. 

I did not try this on you program but on every other implementation I've
seen this approach works just fine.

Jeff Creem




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Invalid page fault with gnat304a on Win95
  1996-10-04  0:00   ` Jeff Creem
@ 1996-10-04  0:00     ` Robert A Duff
  0 siblings, 0 replies; 6+ messages in thread
From: Robert A Duff @ 1996-10-04  0:00 UTC (permalink / raw)



In article <jcreem-0410961142090001@ljd155.sanders.lockheed.com>,
Jeff Creem <jcreem@mv.mv.com> wrote:
>I think the above will work but for something not quit that ugly you
>could have the test code run out of the context of a task. Define the
>task as a task type and set the 'Storage_Size of the task type to the
>appropriate value. 

This will work, but it seems like overkill to drag in the whole tasking
run-time system if the program is not already a multi-tasking program.

Also, you should use pragma Storage_Size, not the obsolete "for
T'Storage_Size use ..." notation.

- Bob




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1996-10-04  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-01  0:00 Invalid page fault with gnat304a on Win95 Vinicius Fernando Arcaro
1996-10-01  0:00 ` Sune Falck
1996-10-04  0:00   ` Jeff Creem
1996-10-04  0:00     ` Robert A Duff
1996-10-02  0:00 ` Nikolay P. Vasilyev
  -- strict thread matches above, loose matches on Subject: below --
1996-10-01  0:00 Vinicius Fernando Arcaro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox