comp.lang.ada
 help / color / mirror / Atom feed
* Secondary Stack oddities w/ SGI Ada 95
@ 1999-05-03  0:00 Viqar Abbasi
  0 siblings, 0 replies; 6+ messages in thread
From: Viqar Abbasi @ 1999-05-03  0:00 UTC (permalink / raw)
  To: Gnat Chat

Hi all,

I have reduced my GNAT problem down to a very
basic "Hello World" program which crashes.  My
working environment is SGI Irix 6.5 w/ SGI Ada 95
1.2.  The application is a big flight simulator,
mostly containing C & Fortran.  We're phasing
Ada in, and its been mostly successful... However,
I've been tackling this crazy bug for a few weeks
now with no success... Here's how it works...

The following works fine:

procedure Report(Message : String) is
  Text_IO.Put_Line(Message);
end Report;

being called from...
procedure My_Test is
begin
  MOTS_IO.Report("Hello World!");
end My_Test;

The following crashes:

procedure Report(Message : String) is
  Text_IO.Put_Line("Hello " & Message);
end My_Test;

being called from...
procedure My_Test is 
begin
  MOTS_IO.Report("World!")
end My_Test;

The dbx dump is below.  My call is the only statement in the
package "Report_Test", in the procedure "My_Test".  To make things
slightly more complex, the package spec as the following...

Pragma Export(C, My_Test, "report_test__my_test_");

"My_Test" is being called from C, (as shown in the dbx output).

The key thing I'm seeing in the dbx output is this "Secondary
Stack" function "SS_Mark" generating a trap.

Any explanations?  

(BTW, can someone explain me GDB?  I hear about it in the 
GNAT discussion group, but haven't seen it anywhere in my
distribution... Maybe it could help me debug, if it supports
multiple languages well...).

Thanks very much!

Puzzled Viqar.

> more dbx.out 
dbx version 7.2.1.1m (patch 3293) Jul 27 1998 15:23:33
Core from signal SIGQUIT: Quit
>  0 _kill(0x27b45, 0x3, 0x7ffee7c0, 0x0) ["kill.s":15, 0xfa4018c]
   1 abort_logger_(signal = 0x7fff2448, pc = 0x7fff24a0, link =
0x7fff2408, stack = (nil))
["/usr2/caelib/simex_plus/work/work6769/cel_routines.c":1233, 0x5bb870]
   2 DISPERR(sig = 11, code = 4, sc = 0x7fff2498)
["/mots2/cae/ship/istemp/cpulock/disp/disperr.c":44, 0x422598]
   3 SegVioHandler(sig = 11, code = 4, sc = 0x7fff2498)
["/usr2/cts/ctssrv_400/server.c":3523, 0x537bf8]
   4 _sigtramp(0xb, 0x3, 0x7fff2498, 0x0) ["sigtramp.s":71, 0xfae8034]
   5 system__secondary_stack__ss_mark() ["s-secsta.adb":205, 0x5f620530]
   6 mots_io__report(0x0, 0x60000, 0x10012190, 0x1001219c)
["/old/root/usr/people/viqar/mots/sacs/apr16/tmp/mots_io156395/mots_io.adb":0,
0x4d3e2c]
   7 report_test__my_test_(0x0, 0x60000, 0x10012190, 0x1001219c)
["/old/root/usr/people/viqar/mots/sacs/apr16/tmp/report_test147059/report_test.adb":0,
0x503da0]
   8 critsched()
["/mots2/cae/ship/istemp/cpulock/disp/rt_critsched.c":177, 0x41f688]
   9 CRITDSP() ["/mots2/cae/ship/istemp/cpulock/disp/rt_critdisp.c":207,
0x421f08]
   10 _sigtramp(0xe, 0x60000, 0x7fff2b88, 0x1001219c) ["sigtramp.s":71,
0xfae8034]
   11 __pause(0x0, 0x100394c0, 0x100394d0, 0x1) ["pause.s":20,
0xfac4808]
More (n if no)?   12 _pause(0x0, 0x100394c0, 0x100394d0, 0x1)
["pauseSCI.c":29, 0xfac487c]
   13 main(argc = 2, argv = 0x7fff2fa4)
["/mots2/cae/ship/istemp/cpulock/disp/rt_syncdisp.c":134, 0x41c714]
   14 __istart() ["crt1tinit.s":13, 0x41c430]




^ permalink raw reply	[flat|nested] 6+ messages in thread
* Secondary Stack oddities w/ SGI Ada 95
@ 1999-05-03  0:00 Viqar Abbasi
  1999-05-03  0:00 ` dennison
  0 siblings, 1 reply; 6+ messages in thread
From: Viqar Abbasi @ 1999-05-03  0:00 UTC (permalink / raw)
  To: Gnat Chat

Hi all,

I have reduced my GNAT problem down to a very
basic "Hello World" program which crashes.  My
working environment is SGI Irix 6.5 w/ SGI Ada 95
1.2.  The application is a big flight simulator,
mostly containing C & Fortran.  We're phasing
Ada in, and its been mostly successful... However,
I've been tackling this crazy bug for a few weeks
now with no success... Here's how it works...

The following works fine:

procedure Report(Message : String) is
  Text_IO.Put_Line(Message);
end Report;

being called from...
procedure My_Test is
begin
  MOTS_IO.Report("Hello World!");
end My_Test;

The following crashes:

procedure Report(Message : String) is
  Text_IO.Put_Line("Hello " & Message);
end My_Test;

being called from...
procedure My_Test is 
begin
  MOTS_IO.Report("World!")
end My_Test;

The dbx dump is below.  My call is the only statement in the
package "Report_Test", in the procedure "My_Test".  To make things
slightly more complex, the package spec as the following...

Pragma Export(C, My_Test, "report_test__my_test_");

"My_Test" is being called from C, (as shown in the dbx output).

The key thing I'm seeing in the dbx output is this "Secondary
Stack" function "SS_Mark" generating a trap.

Any explanations?  

Thanks very much!

Puzzled Viqar.

> more dbx.out 
dbx version 7.2.1.1m (patch 3293) Jul 27 1998 15:23:33
Core from signal SIGQUIT: Quit
>  0 _kill(0x27b45, 0x3, 0x7ffee7c0, 0x0) ["kill.s":15, 0xfa4018c]
   1 abort_logger_(signal = 0x7fff2448, pc = 0x7fff24a0, link =
0x7fff2408, stack = (nil))
["/usr2/caelib/simex_plus/work/work6769/cel_routines.c":1233, 0x5bb870]
   2 DISPERR(sig = 11, code = 4, sc = 0x7fff2498)
["/mots2/cae/ship/istemp/cpulock/disp/disperr.c":44, 0x422598]
   3 SegVioHandler(sig = 11, code = 4, sc = 0x7fff2498)
["/usr2/cts/ctssrv_400/server.c":3523, 0x537bf8]
   4 _sigtramp(0xb, 0x3, 0x7fff2498, 0x0) ["sigtramp.s":71, 0xfae8034]
   5 system__secondary_stack__ss_mark() ["s-secsta.adb":205, 0x5f620530]
   6 mots_io__report(0x0, 0x60000, 0x10012190, 0x1001219c)
["/old/root/usr/people/viqar/mots/sacs/apr16/tmp/mots_io156395/mots_io.adb":0,
0x4d3e2c]
   7 report_test__my_test_(0x0, 0x60000, 0x10012190, 0x1001219c)
["/old/root/usr/people/viqar/mots/sacs/apr16/tmp/report_test147059/report_test.adb":0,
0x503da0]
   8 critsched()
["/mots2/cae/ship/istemp/cpulock/disp/rt_critsched.c":177, 0x41f688]
   9 CRITDSP() ["/mots2/cae/ship/istemp/cpulock/disp/rt_critdisp.c":207,
0x421f08]
   10 _sigtramp(0xe, 0x60000, 0x7fff2b88, 0x1001219c) ["sigtramp.s":71,
0xfae8034]
   11 __pause(0x0, 0x100394c0, 0x100394d0, 0x1) ["pause.s":20,
0xfac4808]
More (n if no)?   12 _pause(0x0, 0x100394c0, 0x100394d0, 0x1)
["pauseSCI.c":29, 0xfac487c]
   13 main(argc = 2, argv = 0x7fff2fa4)
["/mots2/cae/ship/istemp/cpulock/disp/rt_syncdisp.c":134, 0x41c714]
   14 __istart() ["crt1tinit.s":13, 0x41c430]




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

end of thread, other threads:[~1999-05-06  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <018101be9589$6a4b4ad0$153095cd@visnt021.vis.crc.com>
1999-05-03  0:00 ` Secondary Stack oddities w/ SGI Ada 95 Viqar Abbasi
1999-05-03  0:00 Viqar Abbasi
  -- strict thread matches above, loose matches on Subject: below --
1999-05-03  0:00 Viqar Abbasi
1999-05-03  0:00 ` dennison
1999-05-05  0:00   ` Viqar Abbasi
1999-05-06  0:00     ` dennison

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