mirror of
https://fuchsia.googlesource.com/third_party/libxml2
synced 2024-07-11 15:02:41 +00:00
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:
parent
fc119e3290
commit
886bf4e63b
28
Makefile.am
28
Makefile.am
|
@ -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 \
|
||||
|
|
|
@ -395,4 +395,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -419,4 +419,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -421,4 +421,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -2083,7 +2083,6 @@ int main(int argc, char **argv) {
|
|||
|
||||
}
|
||||
xmlNanoFTPClose(ctxt);
|
||||
xmlMemoryDump();
|
||||
exit(0);
|
||||
}
|
||||
#endif /* STANDALONE */
|
||||
|
|
|
@ -1912,7 +1912,6 @@ int main(int argc, char **argv) {
|
|||
"\tusage %s [ URL [ filename ] ]\n", argv[0]);
|
||||
}
|
||||
xmlNanoHTTPCleanup();
|
||||
xmlMemoryDump();
|
||||
return(0);
|
||||
}
|
||||
#endif /* STANDALONE */
|
||||
|
|
|
@ -31,4 +31,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -56,4 +56,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -47,4 +47,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -53,4 +53,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -45,4 +45,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -28,5 +28,4 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
||||
|
|
|
@ -48,4 +48,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -26,5 +26,4 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
||||
|
|
|
@ -110,4 +110,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -59,4 +59,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -107,4 +107,3 @@ if __name__ == '__main__':
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -32,4 +32,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -61,4 +61,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -62,4 +62,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -443,4 +443,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -334,4 +334,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -157,4 +157,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -47,4 +47,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -46,4 +46,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -125,4 +125,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -98,4 +98,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -33,4 +33,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -53,4 +53,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -83,4 +83,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -29,4 +29,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -44,5 +44,4 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
||||
|
|
|
@ -40,5 +40,4 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
||||
|
|
|
@ -48,5 +48,4 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
||||
|
|
|
@ -147,4 +147,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -135,4 +135,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -96,4 +96,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -25,4 +25,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -38,4 +38,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -38,4 +38,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -60,4 +60,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -55,5 +55,4 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
||||
|
|
|
@ -72,5 +72,4 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
||||
|
|
|
@ -79,5 +79,4 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
||||
|
|
|
@ -79,4 +79,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -141,4 +141,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -48,4 +48,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -46,4 +46,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -26,4 +26,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -54,4 +54,3 @@ if libxml2.debugMemory(1) == 0:
|
|||
print("OK")
|
||||
else:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -5308,7 +5308,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||
nb_tests, nb_errors, nb_leaks);
|
||||
}
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
|
|
@ -586,7 +586,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||
}
|
||||
xmlXPathFreeContext(ctxtXPath);
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
|
||||
if (logfile != NULL)
|
||||
fclose(logfile);
|
||||
|
|
|
@ -2053,7 +2053,6 @@ main(void)
|
|||
xmlFreeDoc(instance);
|
||||
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
|
|
@ -70,8 +70,6 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||
|
||||
xmlModuleClose(module);
|
||||
|
||||
xmlMemoryDump();
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -441,6 +441,5 @@ int main(void)
|
|||
}
|
||||
clean_strings();
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
return(ret);
|
||||
}
|
||||
|
|
|
@ -1622,7 +1622,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||
nb_tests, nb_errors, nb_leaks);
|
||||
}
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
|
|
@ -1208,7 +1208,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||
nb_tests, nb_errors, nb_leaks);
|
||||
}
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
|
|
@ -598,7 +598,6 @@ int main(int argc, char **argv) {
|
|||
* Cleanup and check for memory leaks
|
||||
*/
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
return(exit_value);
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -3753,7 +3753,6 @@ main(int argc, char **argv) {
|
|||
|
||||
error:
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
|
||||
return(progresult);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -95,5 +95,4 @@ finally:
|
|||
libxml2.cleanupParser()
|
||||
if libxml2.debugMemory(1) != 0:
|
||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||
libxml2.dumpMemory()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user