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

Re: memory leak in krb5_rd_cred



Michael B Allen wrote:
> On Tue, 20 Feb 2007 17:35:53 -0800
> "Henry B. Hotz" <hotz@jpl.nasa.gov> wrote:
>
>   
>> I don't suppose there is a comparable issue with krb5_rd_req?
>>     
>
> Not that I can see. The krb5_rd_req function is totally different and
> all the krb5_decrypt_EncryptedData products in rd_req.c look like they're
> cleaned up.
>
>   
>> I have  
>> an app with a slow leak that uses it, but I can't be sure it doesn't  
>> have to do with funny linking conflicts or external issues.  The leak  
>> goes away if I link against Sun Kerberos, but I'm not supposed to do  
>> that. ;-)
>>     
>
> Tried valgrind? That's how I found this leak in the first place.
>
>   
valgrind is definitely cool, for Linux. There are other good malloc 
debuggers out there. FunctionCheck works on Linux and Solaris.  
http://www.highlandsun.com/hyc/#fncchk
> As for linking conflicts we have had good results using
> -Wl,--version-script=export.ld on Linux to only export symbols used by
> our app. Not sure if Solaris does symbol versioning but I'd be curious
> to know if it does and how it's done.
>   

Yes, and it's well documented in the linker manual.

-- 
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc
  Chief Architect, OpenLDAP     http://www.openldap.org/project/