Is the Ada run-time required to detect out-of-memory conditions?
From: Ludovic Brenta (ludovic.brenta_at_insalien.org)
Date: 05/21/04
- Next message: Jo: ""out" parameters"
- Previous message: Georg Bauhaus: "Re: Ada used in General Aviation (GA) applications?"
- Next in thread: Georg Bauhaus: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Georg Bauhaus: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Stephen Leake: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Robert I. Eachus: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Vinzent 'Gadget' Hoefler: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Wojtek Narczynski: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Mark H Johnson: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: user_at_domain.invalid: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 21 May 2004 00:54:27 +0200
Hello,
I have received a bug report [1] against GNAT 3.15p and reproduced the
same behaviour with GCC 3.4. I would like the advice of language
lawyers on the issue.
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250076
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.
My first impression is that the program exhausts physical memory (RAM
+ swap) before exhausting the default storage pool, the size of which
is defined to be the total size of the virtual address space. As a
result, the kernel detects the out-of-memory condition before the Ada
run-time library does, and sends SIGKILL to the program. Of course,
the program has no chance to turn SIGKILL into an exception.
Is my assessment correct? Is this a bug in the GNAT library?
Thanks for any insight.
PS. The original reported says that the program receives SIGSEGV. He
uses Linux 2.4.22. I use 2.4.26 and the program receives SIGKILL
instead. I don't know if this is a known change in the kernel's
behaviour.
-- Ludovic Brenta.
- Next message: Jo: ""out" parameters"
- Previous message: Georg Bauhaus: "Re: Ada used in General Aviation (GA) applications?"
- Next in thread: Georg Bauhaus: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Georg Bauhaus: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Stephen Leake: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Robert I. Eachus: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Vinzent 'Gadget' Hoefler: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Wojtek Narczynski: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: Mark H Johnson: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Reply: user_at_domain.invalid: "Re: Is the Ada run-time required to detect out-of-memory conditions?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|