[PATCH] D37321: llvm-mt: Fix memory management in WindowsManifestMergerImpl::getMergedManifest
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 14:26:53 PDT 2017
vitalybuka added a comment.
In https://reviews.llvm.org/D37321#859258, @ecbeckmann wrote:
> Sorry for being so late to respond to this, I've been busy with team match this week.
>
> Thanks for catching these errors. It was my fault for just using unique_ptr instead of explicitly calling xmlFree on the xmlDoc structures. However, I'm confused about the XML_PARSE_NODICT flag, how will this help? As far as I can tell it prevents the creation of a new string dictionary for that xmlDoc that is parsed? Which could be a problem if I had href's and namespaces in one tree point to another. However I never do this and always duplicate the entire string from one tree to another.
As soon as I start to delete OutputDoc correctly xmlFreeDoc(Doc) in ~WindowsManifestMergerImpl() fails. I guess I see this both with or without asan. XML_PARSE_NODICT helps.
> Also out of curiosity how did you discover the presence of memory problems? I've looked on msan and nothing seems to be there.
check-llvm under msan disables libxml (and other 3rd party deps) as it's need to be msan instrumented as well.
I am using check-llvm with asan
https://reviews.llvm.org/D37321
More information about the llvm-commits
mailing list