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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ec31fb6eda682268,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: James Alan Farrell Newsgroups: comp.lang.ada Subject: STORAGE_ERROR in adainit Date: Wed, 11 Aug 2004 17:31:24 -0400 Message-ID: X-Newsreader: Forte Free Agent 2.0/32.652 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: fw.grammatech.com X-Trace: newsfeed.slurp.net 1092259949 209.4.89.67 (11 Aug 2004 16:32:29 -0500) X-Original-NNTP-Posting-Host: 209.4.89.67 Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!newsfeed.slurp.net!not-for-mail Xref: g2news1.google.com comp.lang.ada:2683 Date: 2004-08-11T17:31:24-04:00 List-Id: Hello, I am asking this question again because I think I did not explain it well before. (most of the answers boiled down to "make sure you are calling adainit" -- but adainit is what is giving the error!) I hope that did not sound snide - I do appreciate that people took the time to answer. I have a mixed language program with the main function written in C. There are several libraries written C and one written in Ada. The first command in main is adainit, and that function is raising the following error: raised STORAGE_ERROR : stack overflow (or erroneous memory access) If I remove all the calls to C library routines the call to adainit does not raise this error. All the removed calls take place AFTER the call to adainit -- which makes me think there is something wrong with how the libraries are linked. It feels like one library is overwriting another or something. I am using gnat version 3.15p to compile the Ada, and gcc 2.8.1 to compile the C code. I have looked through the GNAT manual sections on creating libraries and mixed language programming, and as far as I can tell everything is correct. I believe I gave the details in the previous posting. Due to the answers to that posting I will simply emphasize that I have read the relevant sections and unless I am not understanding something, the makefile is correct. And again I will emphasize that I am calling adainit, and that is where the problem is occuring. Is there anything special I have to do to create C libraries when linking to Ada libraries? I've been stuck on this issue for a week and would REALLY like to show some forward progress. If anyone has some insight into this problem I would REALLY appreciate hearing it. Thank you, James Alan Farrell GrammaTech, inc.