comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Eachus <rieachus@comcast.net>
Subject: Re: Interfaces.C + generics: stack overflow
Date: Sun, 26 Mar 2017 15:34:23 -0700 (PDT)
Date: 2017-03-26T15:34:23-07:00	[thread overview]
Message-ID: <39ada48a-1faf-49fd-a97d-8544269de8e7@googlegroups.com> (raw)
In-Reply-To: <ejng82F8rprU1@mid.individual.net>

On Saturday, March 25, 2017 at 11:21:41 AM UTC-4, hreba wrote:

> It works finally, I just don't know the reason. All I did is take 
> Dmitrys suggestion, and move the package instantiation from the main 
> program to package Integ_Aux (that is where the function to be passed to 
> the C-library-integrator is defined.)

I'm glad you found a solution.  Dave Emery used to call Storage_Error a parachute that opened on impact.  (Think Roadrunner cartoons.) Things have gotten a lot better, and GNAT in particular tries to identify all cases where Storage_Error will always be raised (as warnings).  But the real issue is that it is in general not possible to create a stack frame or allocate an object after an occurrence of Storage_Error.

It would be nice if there was a parameter which identified where in that particular compiler the Storage_Error came from.  Yes, Storage_Error is raised during execution, but the generated code or sometimes even the run-time library code has no clue you can use during debugging.  I wonder how much could be done with Exception_Message.  If the compiler had a collection of strings to be returned, there would be no need to allocate space for a string after the Storage_Error..

  reply	other threads:[~2017-03-26 22:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23  7:43 Interfaces.C + generics: stack overflow hreba
2017-03-23  7:46 ` hreba
2017-03-23 17:45 ` Jeffrey R. Carter
2017-03-24 12:20   ` hreba
2017-03-23 20:03 ` Randy Brukardt
2017-03-24 12:42   ` hreba
2017-03-24 20:13     ` Randy Brukardt
2017-03-24 22:03     ` Dmitry A. Kazakov
2017-03-25 14:17       ` hreba
2017-03-25 15:21         ` hreba
2017-03-26 22:34           ` Robert Eachus [this message]
2017-03-27  7:21             ` Dmitry A. Kazakov
2017-03-30 17:12               ` Robert Eachus
2017-03-25 15:23         ` Dmitry A. Kazakov
replies disabled

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