Stop calling xmlMemoryDump

This was used to check for memory leaks but could potentially create a
.memdump file. These days, there are better ways to check for memory
leaks.
This commit is contained in:
Nick Wellnhofer 2023-04-30 15:35:47 +02:00
parent fc119e3290
commit 886bf4e63b
68 changed files with 1 additions and 109 deletions

View File

@ -233,7 +233,6 @@ endif
tests: $(OLD_TESTS)
Scripttests : xmllint$(EXEEXT)
@(echo > .memdump)
@echo "## Scripts regression tests"
@echo "## Some of the base computations may be different if srcdir != ."
-@(for i in $(srcdir)/test/scripts/*.script ; do \
@ -243,10 +242,8 @@ Scripttests : xmllint$(EXEEXT)
if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > $(srcdir)/result/scripts/$$name 2> $(srcdir)/result/scripts/$$name.err ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > result.$$name 2> result.$$name.err ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/scripts/$$name result.$$name ; \
diff $(srcdir)/result/scripts/$$name.err result.$$name.err` ; \
if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
@ -254,7 +251,6 @@ Scripttests : xmllint$(EXEEXT)
fi ; fi ; done)
Catatests : xmlcatalog$(EXEEXT)
@(echo > .memdump)
@echo "## Catalog regression tests"
-@(for i in $(srcdir)/test/catalogs/*.script ; do \
name=`basename $$i .script`; \
@ -263,10 +259,8 @@ Catatests : xmlcatalog$(EXEEXT)
if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
rm result.$$name ; \
@ -278,33 +272,22 @@ Catatests : xmlcatalog$(EXEEXT)
if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > result.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
rm result.$$name ; \
fi ; fi ; done)
@echo "## Add and del operations on XML Catalogs"
-@($(CHECKER) $(top_builddir)/xmlcatalog --create --noout $(srcdir)/result/catalogs/mycatalog; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
$(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid sysid $(srcdir)/result/catalogs/mycatalog; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
$(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid2 sysid2 $(srcdir)/result/catalogs/mycatalog; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
$(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid3 sysid3 $(srcdir)/result/catalogs/mycatalog; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
diff result/catalogs/mycatalog.full $(srcdir)/result/catalogs/mycatalog; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
$(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid $(srcdir)/result/catalogs/mycatalog; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
$(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid3 $(srcdir)/result/catalogs/mycatalog; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
$(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid2 $(srcdir)/result/catalogs/mycatalog; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
diff result/catalogs/mycatalog.empty $(srcdir)/result/catalogs/mycatalog; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
rm -f $(srcdir)/result/catalogs/mycatalog)
dba100000.xml: dbgenattr.pl
@ -319,30 +302,21 @@ Timingtests: xmllint$(EXEEXT) dba100000.xml
@echo "## 3/ repeated DOM parsing"
@echo "## 4/ repeated DOM validation"
-@($(top_builddir)/xmllint --stream --timing dba100000.xml; \
MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
exit 0)
-@($(top_builddir)/xmllint --stream --timing --memory dba100000.xml; \
MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
exit 0)
-@($(top_builddir)/xmllint --noout --timing --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
exit 0)
VTimingtests: xmllint$(EXEEXT)
-@($(top_builddir)/xmllint --noout --timing --valid --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
exit 0)
Schematrontests: xmllint$(EXEEXT)
@(echo > .memdump)
@echo "## Schematron regression tests"
-@(for i in $(srcdir)/test/schematron/*.sct ; do \
name=`basename $$i | sed 's+\.sct++'`; \
@ -355,11 +329,9 @@ Schematrontests: xmllint$(EXEEXT)
$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
> $(srcdir)/result/schematron/"$$name"_"$$xno" \
2> $(srcdir)/result/schematron/"$$name"_"$$xno".err; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
> res.$$name 2> err.$$name;\
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/schematron/"$$name"_"$$xno" \
res.$$name;\
diff $(srcdir)/result/schematron/"$$name"_"$$xno".err \

View File

@ -395,4 +395,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -419,4 +419,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -421,4 +421,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -2083,7 +2083,6 @@ int main(int argc, char **argv) {
}
xmlNanoFTPClose(ctxt);
xmlMemoryDump();
exit(0);
}
#endif /* STANDALONE */

View File

@ -1912,7 +1912,6 @@ int main(int argc, char **argv) {
"\tusage %s [ URL [ filename ] ]\n", argv[0]);
}
xmlNanoHTTPCleanup();
xmlMemoryDump();
return(0);
}
#endif /* STANDALONE */

View File

@ -31,4 +31,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -56,4 +56,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -47,4 +47,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -53,4 +53,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -45,4 +45,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -28,5 +28,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -48,4 +48,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -26,5 +26,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -110,4 +110,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -59,4 +59,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -107,4 +107,3 @@ if __name__ == '__main__':
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -32,4 +32,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -61,4 +61,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -62,4 +62,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -443,4 +443,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -334,4 +334,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -157,4 +157,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -47,4 +47,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -46,4 +46,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -125,4 +125,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -98,4 +98,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -33,4 +33,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -53,4 +53,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -83,4 +83,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -29,4 +29,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -44,5 +44,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -40,5 +40,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -48,5 +48,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -147,4 +147,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -135,4 +135,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -96,4 +96,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -25,4 +25,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -15,7 +15,6 @@ class TestCase(unittest.TestCase):
def tearDown(self):
libxml2.cleanupParser()
if libxml2.debugMemory(1) != 0:
libxml2.dumpMemory()
self.fail("Memory leak %d bytes" % (libxml2.debugMemory(1),))
else:
print("OK")

View File

@ -38,4 +38,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -38,4 +38,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -60,4 +60,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -55,5 +55,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -72,5 +72,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -79,5 +79,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -79,4 +79,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -141,4 +141,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -48,4 +48,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -46,4 +46,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -51,5 +51,3 @@ if leakedbytes == 0:
print("OK")
else:
print("Memory leak", leakedbytes, "bytes")
# drop file to .memdump file in cwd, but won't work if not compiled in
libxml2.dumpMemory()

View File

@ -26,4 +26,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -54,4 +54,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()

View File

@ -522,7 +522,6 @@ xsdTestCase(xmlNodePtr tst) {
if ((mem != xmlMemUsed()) && (extraMemoryFromResolver == 0)) {
test_log("Validation of instance line %ld leaked %d\n",
xmlGetLineNo(tmp), xmlMemUsed() - mem);
xmlMemoryDump();
nb_leaks++;
}
}
@ -577,7 +576,6 @@ xsdTestCase(xmlNodePtr tst) {
if ((mem != xmlMemUsed()) && (extraMemoryFromResolver == 0)) {
test_log("Validation of instance line %ld leaked %d\n",
xmlGetLineNo(tmp), xmlMemUsed() - mem);
xmlMemoryDump();
nb_leaks++;
}
}
@ -1157,7 +1155,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
}
xmlXPathFreeContext(ctxtXPath);
xmlCleanupParser();
xmlMemoryDump();
if (logfile != NULL)
fclose(logfile);

View File

@ -5308,7 +5308,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_tests, nb_errors, nb_leaks);
}
xmlCleanupParser();
xmlMemoryDump();
return(ret);
}

View File

@ -586,7 +586,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
}
xmlXPathFreeContext(ctxtXPath);
xmlCleanupParser();
xmlMemoryDump();
if (logfile != NULL)
fclose(logfile);

View File

@ -2053,7 +2053,6 @@ main(void)
xmlFreeDoc(instance);
xmlCleanupParser();
xmlMemoryDump();
return (0);
}

View File

@ -70,8 +70,6 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlModuleClose(module);
xmlMemoryDump();
return(0);
}

View File

@ -352,14 +352,12 @@ int main(int argc, char **argv) {
if (test_get_malloc_blocks_outstanding () > 0) {
fprintf (stdout, "%d blocks leaked\n",
test_get_malloc_blocks_outstanding ());
xmlMemoryDump();
return 1;
}
files ++;
}
}
xmlMemoryDump();
return 0;
}

View File

@ -135,7 +135,6 @@ main(void)
threadParams[i].filename);
}
xmlCleanupParser();
xmlMemoryDump();
return (0);
}
#elif defined(_WIN32)
@ -198,7 +197,6 @@ main(void)
}
xmlCleanupParser();
xmlMemoryDump();
return (0);
}

View File

@ -174,8 +174,8 @@ int main(int argc, char **argv) {
mem = xmlMemUsed();
if ((blocks != 0) || (mem != 0)) {
printf("testapi leaked %d bytes in %d blocks\n", mem, blocks);
ret = 1;
}
xmlMemoryDump();
return (ret != 0);
}

View File

@ -741,9 +741,5 @@ int main(void) {
* Cleanup function for the XML library.
*/
xmlCleanupParser();
/*
* this is to debug memory for regression tests
*/
xmlMemoryDump();
return(ret ? 1 : 0);
}

View File

@ -441,6 +441,5 @@ int main(void)
}
clean_strings();
xmlCleanupParser();
xmlMemoryDump();
return(ret);
}

View File

@ -1622,7 +1622,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_tests, nb_errors, nb_leaks);
}
xmlCleanupParser();
xmlMemoryDump();
return(ret);
}

View File

@ -1208,7 +1208,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_tests, nb_errors, nb_leaks);
}
xmlCleanupParser();
xmlMemoryDump();
return(ret);
}

View File

@ -598,7 +598,6 @@ int main(int argc, char **argv) {
* Cleanup and check for memory leaks
*/
xmlCleanupParser();
xmlMemoryDump();
return(exit_value);
}
#else

View File

@ -3753,7 +3753,6 @@ main(int argc, char **argv) {
error:
xmlCleanupParser();
xmlMemoryDump();
return(progresult);
}

View File

@ -160,7 +160,6 @@ xmlMallocLoc(size_t size, const char * file, int line)
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
xmlGenericError(xmlGenericErrorContext,
"xmlMallocLoc : Unsigned overflow\n");
xmlMemoryDump();
return(NULL);
}
@ -169,7 +168,6 @@ xmlMallocLoc(size_t size, const char * file, int line)
if (!p) {
xmlGenericError(xmlGenericErrorContext,
"xmlMallocLoc : Out of free space\n");
xmlMemoryDump();
return(NULL);
}
p->mh_tag = MEMTAG;
@ -236,7 +234,6 @@ xmlMallocAtomicLoc(size_t size, const char * file, int line)
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
xmlGenericError(xmlGenericErrorContext,
"xmlMallocAtomicLoc : Unsigned overflow\n");
xmlMemoryDump();
return(NULL);
}
@ -245,7 +242,6 @@ xmlMallocAtomicLoc(size_t size, const char * file, int line)
if (!p) {
xmlGenericError(xmlGenericErrorContext,
"xmlMallocAtomicLoc : Out of free space\n");
xmlMemoryDump();
return(NULL);
}
p->mh_tag = MEMTAG;
@ -347,7 +343,6 @@ xmlReallocLoc(void *ptr,size_t size, const char * file, int line)
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
xmlGenericError(xmlGenericErrorContext,
"xmlReallocLoc : Unsigned overflow\n");
xmlMemoryDump();
return(NULL);
}
@ -501,7 +496,6 @@ xmlMemStrdupLoc(const char *str, const char *file, int line)
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
xmlGenericError(xmlGenericErrorContext,
"xmlMemStrdupLoc : Unsigned overflow\n");
xmlMemoryDump();
return(NULL);
}

View File

@ -95,5 +95,4 @@ finally:
libxml2.cleanupParser()
if libxml2.debugMemory(1) != 0:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
libxml2.dumpMemory()