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,6c7dea22b75ba442 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: ada compiler? From: Georg Bauhaus In-Reply-To: <1195035988.599522.87580@50g2000hsm.googlegroups.com> References: <1194747665.6151.31.camel@K72> <_evZi.177931$Xa3.50640@attbi_s22> <87hcjq46t4.fsf@ludovic-brenta.org> <473abc9d$0$13104$9b4e6d93@newsspool2.arcor-online.net> <1195035988.599522.87580@50g2000hsm.googlegroups.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1195043147.1007.263.camel@kartoffel> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Date: Wed, 14 Nov 2007 13:25:47 +0100 Organization: Arcor NNTP-Posting-Date: 14 Nov 2007 13:24:34 CET NNTP-Posting-Host: f5876645.newsspool4.arcor-online.net X-Trace: DXC=UbZ2=i]HgZSYI9]OHn9o5^4IUKRFcKhl_Ab7@Q=kbmW`a1fGWC`2T@AUZfC[C5k=?oF_^MY X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:18369 Date: 2007-11-14T13:24:34+01:00 List-Id: On Wed, 2007-11-14 at 02:26 -0800, Ludovic Brenta wrote: > Also, if a stack overflow results in > a SEGV (instead of Storage_Error), I don't clearly see the functional > difference i.e. the stack overflow gets caught either way. But who catches? A player in the game (Ada partition), or someone in the stadium (OS)? Assume the desired bahavior is this. A message is emitted by calling Storehouse.Notify in the exception handler below, shouting "Hey! You!". $ ./attempt Hey! You! raised STORAGE_ERROR : stack overflow detected Executable translated without -fstack-check: $ ./attempt Segmentation fault (core dumped) How would the other task (Storehouse) learn about the failure in this case? with Storehouse; procedure attempt is type A is array (Positive range <>) of Natural; function Get_N return Positive is separate; function make_array return A is result : A (1 .. Get_N); begin return result; end make_array; begin Sandbox : declare x : A := make_array; begin x (x'First) := x (x'Last); end Sandbox; exception when Storage_Error => Storehouse.Notify; -- Hey! You! raise; end attempt;