From: awdorrin <awdorrin@gmail.com>
Subject: Re: Stumped: Seg Fault with System.Secondary_Stack.SS_Mark()
Date: Thu, 6 Sep 2012 13:53:11 -0700 (PDT)
Date: 2012-09-06T13:53:11-07:00 [thread overview]
Message-ID: <016ff78a-64f9-4a42-a079-e544526e2f8a@googlegroups.com> (raw)
In-Reply-To: <87fw6u2abw.fsf@ludovic-brenta.org>
The -gnatDG results, for the function in question:
function r_de__get_de_int (de_num : in r_de__de_num_type; to_unit :
in r_convert.r_convert__unit_type := r_convert.r_convert__none)
return global_types__int32 is
M875b : system__secondary_stack__mark_id :=
$system__secondary_stack__ss_mark;
procedure r_de__get_de_int___clean is
begin
$system__secondary_stack__ss_release (M875b);
return;
end r_de__get_de_int___clean;
begin
de_val_flt : global_types__float64;
rc : global_types__int32;
[constraint_error when
r_de__de_data = null
"access check failed"]
[constraint_error when
not (r_de__Tde_num_typeB(de_num) in 1 .. r_de__de_data.all'last)
"index check failed"]
r_de__get_de (de_num, r_de__de_data.all (de_num).addr, to_unit,
de_val_flt, rc);
if rc /= 0 then
subtype r_de__get_de_int__TS863bS is string (1 .. 11);
S863b : string (1 .. 11);
P864b : natural;
$system__img_int__image_integer (integer(rc), S863b, P864b);
R865b : constant natural := P864b;
B869b : declare
begin
g_error.g_error__add_to_q ($system__string_ops__str_concat
("R_DE.GET_DE_INT: FAILED. RC = ", S863b (1 .. R865b)),
error_type => g_common.g_common__non_severe);
end B869b;
if rc = -1 then
$__gnat_raise_exception (ada__exceptions__exception_id!(
r_de__illegal_conversion'reference), "rde_b.ada:2305");
elsif rc = -2 then
$__gnat_raise_exception (ada__exceptions__exception_id!(
r_de__get_de_exception'reference), "rde_b.ada:2308");
end if;
end if;
[constraint_error when
not (de_val_flt > (-(4503599628419072.0*2**(-21))) and then
de_val_flt < (9007199252643840.0*2**(-22)))
"overflow check failed"]
return global_types__int32(de_val_flt);
at end
r_de__get_de_int___clean;
end r_de__get_de_int;
I'm still not sure what to make of that...
Could GNAT be misinterpreting the 'int32' return type? (Global_Types.Int32 is defined as: subtype INT32 is Integer;)
Or could the 'DE_DATA' structure be causing the issues?
It is defined as in the 'rde_b.ada' file as:
type DE_ARRAY_TYPE is array (DE_NUM_TYPE range <>) of DE_REC_TYPE;
NUM_DES: constant INT32 := G_COMMON.NUM_LINES(DE_CFG_FN);
subtype CONSTRAINED_DE_ARRAY is DE_ARRAY_TYPE( DE_NUM_TYPE range 1 .. DE_NUM_TYPE(NUM_DES));
type DE_ARRAY_PTR_TYPE is access all CONSTRAINED_DE_ARRAY;
DE_DATA : DE_ARRAY_PTR_TYPE;
DE_DATA is a pointer to memory allocated by another process (The original developers allocated memory in a HeapMgr package they developed...)
I just don't know if this legacy goofiness with the heapmgr allocating memory is incompatible with the newer Ada95/2005 approaches... or if I'm getting side tracked from the real problem.
next prev parent reply other threads:[~2012-09-06 20:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-06 19:34 Stumped: Seg Fault with System.Secondary_Stack.SS_Mark() awdorrin
2012-09-06 19:57 ` Ludovic Brenta
2012-09-06 20:53 ` awdorrin [this message]
2012-09-06 21:18 ` Ludovic Brenta
2012-09-06 22:13 ` awdorrin
2012-09-07 14:38 ` awdorrin
2012-09-07 14:55 ` Ludovic Brenta
2012-09-07 15:35 ` Simon Wright
2012-09-07 16:18 ` awdorrin
2012-09-07 16:31 ` awdorrin
2012-09-07 17:07 ` Simon Wright
2012-09-07 17:50 ` awdorrin
2012-09-08 13:23 ` francois_fabien
2012-09-10 13:50 ` awdorrin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox