[cxml-devel] [PATCH] A memory leak in klacks parser

16 Nov
2011
16 Nov
'11
8:44 p.m.
I've been trying to parse a relatively large XML file with Klacks and found what seems to be a memory leak inside Klacks parser. 1) When klacks sees the start of an element, an URI is pushed to the 'base-stack' field of 'context' structure ('klacks/element' calls 'p/sztag' which pushes the URI) but never actually removes it off the stack. 2) Similarly, klacks pushes the namespace to the 'namespace-stack' field of 'cxml-source' structure but never actually removes it off the stack ('klacks/element-2' pushes the namespace). Attached is a proposed patch that seems to fix these issues. With the patch, memory usage stays (almost) constant during parsing.
4976
Age (days ago)
4976
Last active (days ago)
0 comments
1 participants
participants (1)
-
Kalyanov Dmitry