comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pogner.demon.co.uk>
Subject: Re: GNAT implementation bug? (or my code)
Date: 2000/04/16
Date: 2000-04-16T00:00:00+00:00	[thread overview]
Message-ID: <x7vd7nqt1ee.fsf@pogner.demon.co.uk> (raw)
In-Reply-To: 8d9qne$3q6$1@nnrp1.deja.com

Robert Dewar <robert_dewar@my-deja.com> writes:

> Second, investigate tools that help you make sure your memory
> management is correct. GNAT comes with such tools (investigate
> gnatmem), and I assume other Ada 95 technologies have similar
> capbilities.

In this case, gnatmem didn't help. However, using System.Debug_Pools.Debug_Pool
did the job:

   type List_Element ;
   type List_Element_Ptr is access list_element ;

   Pool : System.Debug_Pools.Debug_Pool;
   for List_Element_Ptr'Storage_Pool use Pool;

and then

pogner[27]$ gdb q_test
[...]
(gdb) b exception
Breakpoint 1 at 0x80507fd: file a-except.adb, line 922.
(gdb) run
[...]
Breakpoint 1, 0x804ab1b in q_test.q.lm.remove (list=(head => 0x0, tail => 0x0, 
      cursor => 0x0, count => 0, traversing => false))
    at dynamic_list_manager.adb:160
160            Free(Orphan) ;
(gdb) p orphan.all
$3 = (prev => 0xefbeadde, data => -272716322, next => 0xefbeadde)

(the 0xefbeadde are the Intel versions of the classic deadbeef pattern, btw).




      reply	other threads:[~2000-04-16  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <38F5EC37.DED92CDE@ensco.com>
2000-04-14  0:00 ` GNAT implementation bug? (or my code) Tucker Taft
2000-04-14  0:00   ` Stephen Arnold
2000-04-15  0:00     ` Robert Dewar
2000-04-16  0:00       ` Simon Wright [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox