libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libunwind] sos_alloc()


From: David Mosberger
Subject: Re: [libunwind] sos_alloc()
Date: Fri, 26 Mar 2004 15:16:23 -0800

>>>>> On Fri, 26 Mar 2004 16:34:17 -0600 (CST), Todd L Miller <address@hidden> 
>>>>> said:

  Todd> Ah.  But, as I mentioned earlier, libunwind never (seems to) free
  Todd> it (the 112 bytes for the kernel table).

Yes, the kernel-table is read only once (not per address-space).

  Todd> I believe what's going on is that the kernel table is being
  Todd> fetched every time I call unw_is_signal_frame().

Oh, you're calling unw_is_signal_frame()?  That would be the _other_
leak I was referring to (well, I think I did).  Try this:

diff -Nru a/src/ia64/Gis_signal_frame-ia64.c b/src/ia64/Gis_signal_frame-ia64.c
--- a/src/ia64/Gis_signal_frame-ia64.c  Fri Mar 26 15:13:55 2004
+++ b/src/ia64/Gis_signal_frame-ia64.c  Fri Mar 26 15:13:55 2004
@@ -45,5 +45,9 @@
 
   /* For now, we assume that any non-zero abi marker implies a signal frame.
      This should get us pretty far.  */
-  return (sr.abi_marker != 0);
+  ret = (sr.abi_marker != 0);
+
+  ia64_free_state_record (&sr);
+
+  return ret;
 }

  Todd> _Should_ libunwind work with multiple remote processes?

Yes.  There should be no problem creating multiple concurrent
address-spaces (and destroying them when you're done with them).

        --david


reply via email to

[Prev in Thread] Current Thread [Next in Thread]