From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,52b937e9712e08a X-Google-Attributes: gid103376,public From: Viqar Abbasi Subject: Secondary Stack oddities w/ SGI Ada 95 Date: 1999/05/03 Message-ID: <372DC174.F41C72FA@cae.ca>#1/1 X-Deja-AN: 473538609 Content-Transfer-Encoding: 7bit To: Gnat Chat Organization: CAE Electronics Ltd. Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-05-03T00:00:00+00:00 List-Id: 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]