From: hreba <f_hreba@yahoo.com.br>
Subject: Re: storage error: stack overflow
Date: Fri, 14 Aug 2015 10:20:57 -0300
Date: 2015-08-14T10:20:57-03:00 [thread overview]
Message-ID: <d3689rF1uqU1@mid.individual.net> (raw)
In-Reply-To: <lymvxvpsea.fsf@pushface.org>
On 08/13/2015 04:19 AM, Simon Wright wrote:
> hreba <f_hreba@yahoo.com.br> writes:
>
>> ==4823== Invalid read of size 4
>> ==4823== at 0x66FF1A0: ada__strings__unbounded__reference (in
>> /usr/lib/x86_64-linux-gnu/libgnat-4.6.so.1)
>> ==4823== by 0x6703851: ada__strings__unbounded___assign__2 (in
>> /usr/lib/x86_64-linux-gnu/libgnat-4.6.so.1)
>
> There's no Assign in the code of Ada.Strings.Unbounded, so I expect it's
> a subprogram generated by the compiler to manage assignment.
>
> It could be from the finalize of the 'dest' object prior to assignment,
> but I think it's from the adjust after the bitwise copy of the 'source'
> object; Adjust does contain a call to Reference.
>
> Given that, is it possible that something has corrupted the 'source'
> object? (at least 'source.name')
>
The statement
dest.name := source.name;
is the first line in the body of the subprogram
procedure Deep_Copy_Base
(source: Surface; dest: in out Surface'Class);
Setting a breakpoint at this subprogram, "p source" gets me
$1 = (name => (prev => 0x0, next => 0x0, reference => 0x0), dist => 0.0,
zabs => 1500.0, zmin => 0.0, zmax => 0.0, ap => 0x722a90)
and on the other Linux machine, without the error, I get
$1 = (name => (prev => 0x0, next => 0x0, reference => 0xf22b98, last =>
0), dist => 0.0, zabs => 1500.0, zmin => 0.0, zmax => 0.0,
ap => 0x8126b80)
The value of source.name comes from a call of 'To_Unbounded_String("")'.
The null reference is strange.
I made a simple test program with 2 variables a, b of type
'Unbounded_String' and an assignment and it worked. After assigning the
empty string to a its value is
$1 = (prev => 0x0, next => 0x0, reference =>
0x7ffff7dca6a0)<ada.strings.unbounded.empty_shared_string>)
I reinstalled GNAT, GPS and GtkAda from the Ubuntu repository and
nothing changed. I'll continue my investigation when I have more time.
--
Frank Hrebabetzky +55 / 48 / 3235 1106
Florianopolis, Brazil
next prev parent reply other threads:[~2015-08-14 13:20 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 21:53 storage error: stack overflow hreba
2015-08-11 22:19 ` Jeffrey R. Carter
2015-08-12 15:01 ` hreba
2015-08-12 16:00 ` AdaMagica
2015-08-12 17:51 ` Jeffrey R. Carter
2015-08-13 2:17 ` hreba
2015-08-12 8:27 ` briot.emmanuel
2015-08-13 1:34 ` hreba
2015-08-13 2:53 ` Jeffrey R. Carter
2015-08-13 7:05 ` Simon Wright
2015-08-14 13:53 ` hreba
2015-08-14 16:01 ` Simon Wright
2015-08-14 17:00 ` Simon Wright
2015-08-13 7:19 ` Simon Wright
2015-08-14 13:20 ` hreba [this message]
2015-08-12 10:31 ` Markus Schöpflin
2015-08-13 1:36 ` hreba
2015-08-12 10:57 ` Simon Wright
2015-08-13 0:55 ` hreba
2015-08-13 6:58 ` Simon Wright
2015-08-18 2:16 ` hreba
2015-08-18 5:49 ` Jeffrey R. Carter
2015-08-18 7:24 ` Egil H H
2015-08-18 12:23 ` hreba
2015-08-18 12:37 ` Jacob Sparre Andersen
2015-08-18 14:02 ` hreba
2015-08-18 14:11 ` Dmitry A. Kazakov
2015-08-18 14:16 ` Jeffrey R. Carter
2015-08-18 20:56 ` Randy Brukardt
2015-08-19 1:48 ` hreba
2015-08-19 5:10 ` Jeffrey R. Carter
2015-08-19 8:44 ` Georg Bauhaus
2015-08-19 11:56 ` hreba
2015-08-19 20:53 ` Bob Duff
2015-08-18 14:15 ` Egil H H
2015-08-19 13:07 ` hreba
2015-08-18 14:16 ` Jeffrey R. Carter
2015-08-19 13:12 ` hreba
2015-08-19 20:47 ` Bob Duff
2015-08-19 21:47 ` Jeffrey R. Carter
2015-08-20 7:18 ` Dmitry A. Kazakov
2015-08-20 20:48 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox