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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ab4f67f984ef04f9 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Vinzent 'Gadget' Hoefler Newsgroups: comp.lang.ada Subject: Re: Is the Ada run-time required to detect out-of-memory conditions? Date: Fri, 21 May 2004 10:04:02 +0200 Organization: JeLlyFish software Message-ID: References: <878yfmiuak.fsf@insalien.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de vTJ1bl8VF2+2k8La1TLUBgqf5yjAUji2qAEgAX5ukdf4q5bgfR X-Newsreader: Forte Agent 1.8/32.548 Xref: controlnews3.google.com comp.lang.ada:733 Date: 2004-05-21T10:04:02+02:00 List-Id: Ludovic Brenta wrote: >[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D250076 > >The program allocates memory in an infinite loop using "new" and the >default storage pool, and of course exhausts all available storage. >The issue is whether or not Storage_Error should be raised. With >GNAT, no exception is raised; instead the program receives SIGKILL >(not even SIGSEGV) from Linux. Well, as long as these darn modern operating systems let you use memory that isn't even there and then just kill the process instead of signaling an error, there's no chance that the runtime can raise Storage_Error. Same with malloc(). Chances are much higher you just get killed than this one ever returns NULL that you can handle. And everyone still keeps telling you, you should check the return value. ;-( Vinzent.