[xmlsec] Memory Leak with signing a "Large Node Count" document

Aleksey Sanin aleksey at aleksey.com
Mon Nov 13 10:14:09 PST 2006


Which crypto library do you use (openssl, mscrypto, nss, ...)? Which
version of libxml2/xmlsec do you use?

Thanks,
Aleksey

Ed Shallow wrote:
> Hi Aleksey,
> 
>    I seem to have tripped on a memory leak when signing a file with a very
> large quantity of child nodes in the document being signed. The memory leak
> does not appear if, for example all the 500K of content is in a few nodes.
> However when the 500K is spread out over 1000 nodes for example, the memory
> leak appears.
> 
>    I tried the xmlsec command line tool using the --repeat option to rule
> out my application, and the memory leak was still there.
> 
>    Attached is the template and below is the command which leaks memory on
> Windows XP SP2 using openssl with xmlsec 1.2.10.    
> 
>> xmlsec sign --repeat 1000 --pkcs12 keys/edshallow.p12 --pwd password
> --output inout/edsigned-enveloped-ot500K.xml
> tmpl/tmpl-EPM-sign-enveloped-500K.xml
> 
> You will see the memory grow about 300-400 bytes per iteration. I would not
> be surprised if the leak is actually in libxml2.
> 
> Let me know what you see,
> Ed 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec


More information about the xmlsec mailing list