From: jocpaine@googlemail.com
Subject: "STORAGE_ERROR : s-intman.adb:139 explicit raise" from record containing a queue from Ada.Containers.Bounded_Synchronized_Queues in Gnat Ada 2014
Date: Fri, 27 Feb 2015 11:26:26 -0800 (PST)
Date: 2015-02-27T11:26:26-08:00 [thread overview]
Message-ID: <afb441db-d190-422a-992f-7fd8eebeb56a@googlegroups.com> (raw)
Hi. I've defined a queue type by instantiating Ada.Containers.Bounded_Synchronized_Queues . When I define a record with a field of that type, and then declare a variable of the record type, I get the storage error mentioned in the email subject line. That happens even if I never use the variable. However, if my variable is the queue type, I don't get the error. I'm surprised at that, because I'd expect a one-field record to have exactly the same storage layout as its field, so if one provokes the error, so should the other. That aside though, can anyone suggest a fix?
Google shows me that similar errors have been reported before (not with the queue types): for example https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42816 , "Bug 42816 - Crash in Ada.Containers.Vectors.Update_Element".
I'm using Gnat Ada 2014: specifically, gnatmake GPL 2014 (20140331) on Ubuntu 14.10 on version 3.16.0-30-generic of the Linux kernel. My program is below. I compiled it by doing
gnatmake q11
from the file q11.adb . Running it by doing
./q11
gives the error.
Here's the program:
with Ada.Containers.Synchronized_Queue_Interfaces;
with Ada.Containers.Bounded_Synchronized_Queues;
procedure Q11 is
package Job_Queues_Interface is
new Ada.Containers.Synchronized_Queue_Interfaces
( Element_Type => Integer );
package Job_Queues_Package is
new Ada.Containers.Bounded_Synchronized_Queues
( Queue_Interfaces => Job_Queues_Interface
, Default_Capacity => 100
);
subtype My_Queue_Type is Job_Queues_Package.Queue;
type Job_Queue is record
Queue: My_Queue_Type;
end record;
q : Job_Queue;
-- This is the line causing the error. If I give q
-- My_Queue_Type instead, the error doesn't happen.
begin
NULL;
end;
Thanks
Jocelyn Ireson-Paine
www.j-paine.org
www.jocelyns-cartoons.uk
next reply other threads:[~2015-02-27 19:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 19:26 jocpaine [this message]
2015-02-28 10:08 ` "STORAGE_ERROR : s-intman.adb:139 explicit raise" from record containing a queue from Ada.Containers.Bounded_Synchronized_Queues in Gnat Ada 2014 Simon Wright
2015-02-28 21:59 ` Stephen Leake
2015-03-01 12:07 ` AdaMagica
2015-03-02 8:55 ` Egil H H
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox