summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2023-04-30 15:35:47 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2023-04-30 15:48:41 +0200
commit886bf4e63bb920a19a747d6cf55090562dd0f348 (patch)
tree28b9e1a0e067394ee06ac4026654aaf579ebc747
parentfc119e329069fae2ac7c25bc36ccb8847bac04ad (diff)
downloadlibxml2-886bf4e63bb920a19a747d6cf55090562dd0f348.tar.gz
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.
-rw-r--r--Makefile.am28
-rwxr-xr-xcheck-relaxng-test-suite.py1
-rwxr-xr-xcheck-relaxng-test-suite2.py1
-rwxr-xr-xcheck-xsddata-test-suite.py1
-rw-r--r--nanoftp.c1
-rw-r--r--nanohttp.c1
-rwxr-xr-xpython/tests/attribs.py1
-rwxr-xr-xpython/tests/build.py1
-rwxr-xr-xpython/tests/compareNodes.py1
-rwxr-xr-xpython/tests/ctxterror.py1
-rwxr-xr-xpython/tests/cutnpaste.py1
-rwxr-xr-xpython/tests/dtdvalid.py1
-rwxr-xr-xpython/tests/error.py1
-rwxr-xr-xpython/tests/inbuf.py1
-rwxr-xr-xpython/tests/indexes.py1
-rwxr-xr-xpython/tests/nsdel.py1
-rwxr-xr-xpython/tests/outbuf.py1
-rwxr-xr-xpython/tests/push.py1
-rwxr-xr-xpython/tests/pushSAX.py1
-rwxr-xr-xpython/tests/pushSAXhtml.py1
-rwxr-xr-xpython/tests/reader.py1
-rwxr-xr-xpython/tests/reader2.py1
-rwxr-xr-xpython/tests/reader3.py1
-rwxr-xr-xpython/tests/reader4.py1
-rwxr-xr-xpython/tests/reader5.py1
-rwxr-xr-xpython/tests/reader6.py1
-rwxr-xr-xpython/tests/reader7.py1
-rwxr-xr-xpython/tests/reader8.py1
-rwxr-xr-xpython/tests/readererr.py1
-rwxr-xr-xpython/tests/readernext.py1
-rwxr-xr-xpython/tests/regexp.py1
-rwxr-xr-xpython/tests/relaxng.py1
-rwxr-xr-xpython/tests/resolver.py1
-rwxr-xr-xpython/tests/schema.py1
-rwxr-xr-xpython/tests/serialize.py1
-rwxr-xr-xpython/tests/sync.py1
-rwxr-xr-xpython/tests/thread2.py1
-rwxr-xr-xpython/tests/tst.py1
-rwxr-xr-xpython/tests/tstLastError.py1
-rwxr-xr-xpython/tests/tstURI.py1
-rwxr-xr-xpython/tests/tstmem.py1
-rwxr-xr-xpython/tests/tstxpath.py1
-rwxr-xr-xpython/tests/validDTD.py1
-rwxr-xr-xpython/tests/validRNG.py1
-rwxr-xr-xpython/tests/validSchemas.py1
-rwxr-xr-xpython/tests/validate.py1
-rwxr-xr-xpython/tests/walker.py1
-rwxr-xr-xpython/tests/xpath.py1
-rwxr-xr-xpython/tests/xpathext.py1
-rwxr-xr-xpython/tests/xpathleak.py2
-rwxr-xr-xpython/tests/xpathns.py1
-rwxr-xr-xpython/tests/xpathret.py1
-rw-r--r--runsuite.c3
-rw-r--r--runtest.c1
-rw-r--r--runxmlconf.c1
-rw-r--r--schematron.c1
-rw-r--r--testModule.c2
-rw-r--r--testOOM.c2
-rw-r--r--testThreads.c2
-rw-r--r--testapi.c2
-rw-r--r--testchar.c4
-rw-r--r--testdict.c1
-rw-r--r--testlimits.c1
-rw-r--r--testrecurse.c1
-rw-r--r--xmlcatalog.c1
-rw-r--r--xmllint.c1
-rw-r--r--xmlmemory.c6
-rwxr-xr-xxstc/fixup-tests.py1
68 files changed, 1 insertions, 109 deletions
diff --git a/Makefile.am b/Makefile.am
index a5627280..c3ba886b 100644
--- a/Makefile.am
+++ b/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 \
diff --git a/check-relaxng-test-suite.py b/check-relaxng-test-suite.py
index 4372ddc3..3e152123 100755
--- a/check-relaxng-test-suite.py
+++ b/check-relaxng-test-suite.py
@@ -395,4 +395,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/check-relaxng-test-suite2.py b/check-relaxng-test-suite2.py
index 5f286ce2..779cefae 100755
--- a/check-relaxng-test-suite2.py
+++ b/check-relaxng-test-suite2.py
@@ -419,4 +419,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/check-xsddata-test-suite.py b/check-xsddata-test-suite.py
index 69c43ff2..a08e6af6 100755
--- a/check-xsddata-test-suite.py
+++ b/check-xsddata-test-suite.py
@@ -421,4 +421,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/nanoftp.c b/nanoftp.c
index 2bfba853..f4e8c250 100644
--- a/nanoftp.c
+++ b/nanoftp.c
@@ -2083,7 +2083,6 @@ int main(int argc, char **argv) {
}
xmlNanoFTPClose(ctxt);
- xmlMemoryDump();
exit(0);
}
#endif /* STANDALONE */
diff --git a/nanohttp.c b/nanohttp.c
index e014fe48..7c63e94c 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -1912,7 +1912,6 @@ int main(int argc, char **argv) {
"\tusage %s [ URL [ filename ] ]\n", argv[0]);
}
xmlNanoHTTPCleanup();
- xmlMemoryDump();
return(0);
}
#endif /* STANDALONE */
diff --git a/python/tests/attribs.py b/python/tests/attribs.py
index 9170cb7a..16d22f1f 100755
--- a/python/tests/attribs.py
+++ b/python/tests/attribs.py
@@ -31,4 +31,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/build.py b/python/tests/build.py
index 1ff4a5b9..fa894570 100755
--- a/python/tests/build.py
+++ b/python/tests/build.py
@@ -56,4 +56,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/compareNodes.py b/python/tests/compareNodes.py
index 322754d8..9bf6482b 100755
--- a/python/tests/compareNodes.py
+++ b/python/tests/compareNodes.py
@@ -47,4 +47,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/ctxterror.py b/python/tests/ctxterror.py
index 4823194b..4646c2df 100755
--- a/python/tests/ctxterror.py
+++ b/python/tests/ctxterror.py
@@ -53,4 +53,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/cutnpaste.py b/python/tests/cutnpaste.py
index 6134d88b..53eafc45 100755
--- a/python/tests/cutnpaste.py
+++ b/python/tests/cutnpaste.py
@@ -45,4 +45,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/dtdvalid.py b/python/tests/dtdvalid.py
index dc3af120..8f461af4 100755
--- a/python/tests/dtdvalid.py
+++ b/python/tests/dtdvalid.py
@@ -28,5 +28,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/error.py b/python/tests/error.py
index 09102adb..932751ff 100755
--- a/python/tests/error.py
+++ b/python/tests/error.py
@@ -48,4 +48,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/inbuf.py b/python/tests/inbuf.py
index 10a9cf0f..d1225cf3 100755
--- a/python/tests/inbuf.py
+++ b/python/tests/inbuf.py
@@ -26,5 +26,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/indexes.py b/python/tests/indexes.py
index d64dfb81..14b5f11d 100755
--- a/python/tests/indexes.py
+++ b/python/tests/indexes.py
@@ -110,4 +110,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/nsdel.py b/python/tests/nsdel.py
index 7d4aa96f..435da61b 100755
--- a/python/tests/nsdel.py
+++ b/python/tests/nsdel.py
@@ -59,4 +59,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/outbuf.py b/python/tests/outbuf.py
index 2bafcc83..cdd93518 100755
--- a/python/tests/outbuf.py
+++ b/python/tests/outbuf.py
@@ -107,4 +107,3 @@ if __name__ == '__main__':
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/push.py b/python/tests/push.py
index 0b6ae1d3..2c69d729 100755
--- a/python/tests/push.py
+++ b/python/tests/push.py
@@ -32,4 +32,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/pushSAX.py b/python/tests/pushSAX.py
index a2df0a87..ebe62c98 100755
--- a/python/tests/pushSAX.py
+++ b/python/tests/pushSAX.py
@@ -61,4 +61,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/pushSAXhtml.py b/python/tests/pushSAXhtml.py
index eabbfcae..c4126544 100755
--- a/python/tests/pushSAXhtml.py
+++ b/python/tests/pushSAXhtml.py
@@ -62,4 +62,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/reader.py b/python/tests/reader.py
index d8e6fff1..870abf20 100755
--- a/python/tests/reader.py
+++ b/python/tests/reader.py
@@ -443,4 +443,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/reader2.py b/python/tests/reader2.py
index 9d3b7065..66b5c2d0 100755
--- a/python/tests/reader2.py
+++ b/python/tests/reader2.py
@@ -334,4 +334,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/reader3.py b/python/tests/reader3.py
index 6507a7bd..d3241029 100755
--- a/python/tests/reader3.py
+++ b/python/tests/reader3.py
@@ -157,4 +157,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/reader4.py b/python/tests/reader4.py
index 5aeed28e..aea4bf4d 100755
--- a/python/tests/reader4.py
+++ b/python/tests/reader4.py
@@ -47,4 +47,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/reader5.py b/python/tests/reader5.py
index 19d1c3be..6f382519 100755
--- a/python/tests/reader5.py
+++ b/python/tests/reader5.py
@@ -46,4 +46,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/reader6.py b/python/tests/reader6.py
index 7d293c65..75a6f799 100755
--- a/python/tests/reader6.py
+++ b/python/tests/reader6.py
@@ -125,4 +125,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/reader7.py b/python/tests/reader7.py
index 8cb7a731..f1735caa 100755
--- a/python/tests/reader7.py
+++ b/python/tests/reader7.py
@@ -98,4 +98,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/reader8.py b/python/tests/reader8.py
index 1e4b7c00..6e0a70ad 100755
--- a/python/tests/reader8.py
+++ b/python/tests/reader8.py
@@ -33,4 +33,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/readererr.py b/python/tests/readererr.py
index 6c9f85ec..9c518215 100755
--- a/python/tests/readererr.py
+++ b/python/tests/readererr.py
@@ -53,4 +53,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/readernext.py b/python/tests/readernext.py
index 112283ee..cf5f0156 100755
--- a/python/tests/readernext.py
+++ b/python/tests/readernext.py
@@ -83,4 +83,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/regexp.py b/python/tests/regexp.py
index ccef3f66..74b4c919 100755
--- a/python/tests/regexp.py
+++ b/python/tests/regexp.py
@@ -29,4 +29,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/relaxng.py b/python/tests/relaxng.py
index 277ac5f5..63b77e09 100755
--- a/python/tests/relaxng.py
+++ b/python/tests/relaxng.py
@@ -44,5 +44,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/resolver.py b/python/tests/resolver.py
index c39edc9f..cb66c6f0 100755
--- a/python/tests/resolver.py
+++ b/python/tests/resolver.py
@@ -40,5 +40,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/schema.py b/python/tests/schema.py
index 28501f8b..de5cd456 100755
--- a/python/tests/schema.py
+++ b/python/tests/schema.py
@@ -48,5 +48,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/serialize.py b/python/tests/serialize.py
index 6c8a94ec..7fea7aaa 100755
--- a/python/tests/serialize.py
+++ b/python/tests/serialize.py
@@ -147,4 +147,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/sync.py b/python/tests/sync.py
index a9a89c7d..29b4a653 100755
--- a/python/tests/sync.py
+++ b/python/tests/sync.py
@@ -135,4 +135,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/thread2.py b/python/tests/thread2.py
index 9a171e9a..4722592c 100755
--- a/python/tests/thread2.py
+++ b/python/tests/thread2.py
@@ -96,4 +96,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/tst.py b/python/tests/tst.py
index d528bf0c..6887cac3 100755
--- a/python/tests/tst.py
+++ b/python/tests/tst.py
@@ -25,4 +25,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/tstLastError.py b/python/tests/tstLastError.py
index ea57e397..45c99f00 100755
--- a/python/tests/tstLastError.py
+++ b/python/tests/tstLastError.py
@@ -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")
diff --git a/python/tests/tstURI.py b/python/tests/tstURI.py
index b3ac87b9..04543d7d 100755
--- a/python/tests/tstURI.py
+++ b/python/tests/tstURI.py
@@ -38,4 +38,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/tstmem.py b/python/tests/tstmem.py
index a9dbdea2..70477275 100755
--- a/python/tests/tstmem.py
+++ b/python/tests/tstmem.py
@@ -38,4 +38,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/tstxpath.py b/python/tests/tstxpath.py
index ea490127..45b2833e 100755
--- a/python/tests/tstxpath.py
+++ b/python/tests/tstxpath.py
@@ -60,4 +60,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/validDTD.py b/python/tests/validDTD.py
index 1afb93f5..5d1c9c81 100755
--- a/python/tests/validDTD.py
+++ b/python/tests/validDTD.py
@@ -55,5 +55,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/validRNG.py b/python/tests/validRNG.py
index 0b3d60eb..72978688 100755
--- a/python/tests/validRNG.py
+++ b/python/tests/validRNG.py
@@ -72,5 +72,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/validSchemas.py b/python/tests/validSchemas.py
index b68747dc..f5929100 100755
--- a/python/tests/validSchemas.py
+++ b/python/tests/validSchemas.py
@@ -79,5 +79,4 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/validate.py b/python/tests/validate.py
index afdf0e9f..830b5da3 100755
--- a/python/tests/validate.py
+++ b/python/tests/validate.py
@@ -79,4 +79,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/walker.py b/python/tests/walker.py
index 62b48dc1..99d89135 100755
--- a/python/tests/walker.py
+++ b/python/tests/walker.py
@@ -141,4 +141,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/xpath.py b/python/tests/xpath.py
index 816de8a3..9736bde7 100755
--- a/python/tests/xpath.py
+++ b/python/tests/xpath.py
@@ -48,4 +48,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/xpathext.py b/python/tests/xpathext.py
index 69e1fc95..2506287e 100755
--- a/python/tests/xpathext.py
+++ b/python/tests/xpathext.py
@@ -46,4 +46,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/xpathleak.py b/python/tests/xpathleak.py
index 438c13f5..6814baeb 100755
--- a/python/tests/xpathleak.py
+++ b/python/tests/xpathleak.py
@@ -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()
diff --git a/python/tests/xpathns.py b/python/tests/xpathns.py
index a4509052..7fe4235d 100755
--- a/python/tests/xpathns.py
+++ b/python/tests/xpathns.py
@@ -26,4 +26,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/python/tests/xpathret.py b/python/tests/xpathret.py
index 8517c42d..219c2ed3 100755
--- a/python/tests/xpathret.py
+++ b/python/tests/xpathret.py
@@ -54,4 +54,3 @@ if libxml2.debugMemory(1) == 0:
print("OK")
else:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()
diff --git a/runsuite.c b/runsuite.c
index 0880e0a7..750df2a2 100644
--- a/runsuite.c
+++ b/runsuite.c
@@ -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);
diff --git a/runtest.c b/runtest.c
index 80a6c750..c279d113 100644
--- a/runtest.c
+++ b/runtest.c
@@ -5308,7 +5308,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_tests, nb_errors, nb_leaks);
}
xmlCleanupParser();
- xmlMemoryDump();
return(ret);
}
diff --git a/runxmlconf.c b/runxmlconf.c
index 8df9df13..f440bdc1 100644
--- a/runxmlconf.c
+++ b/runxmlconf.c
@@ -586,7 +586,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
}
xmlXPathFreeContext(ctxtXPath);
xmlCleanupParser();
- xmlMemoryDump();
if (logfile != NULL)
fclose(logfile);
diff --git a/schematron.c b/schematron.c
index c105a758..35a1447e 100644
--- a/schematron.c
+++ b/schematron.c
@@ -2053,7 +2053,6 @@ main(void)
xmlFreeDoc(instance);
xmlCleanupParser();
- xmlMemoryDump();
return (0);
}
diff --git a/testModule.c b/testModule.c
index 6d00596f..45edd9f0 100644
--- a/testModule.c
+++ b/testModule.c
@@ -70,8 +70,6 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlModuleClose(module);
- xmlMemoryDump();
-
return(0);
}
diff --git a/testOOM.c b/testOOM.c
index 217e04af..3cb6b2da 100644
--- a/testOOM.c
+++ b/testOOM.c
@@ -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;
}
diff --git a/testThreads.c b/testThreads.c
index 709ae769..d1535944 100644
--- a/testThreads.c
+++ b/testThreads.c
@@ -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);
}
diff --git a/testapi.c b/testapi.c
index ab22e726..1021a208 100644
--- a/testapi.c
+++ b/testapi.c
@@ -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);
}
diff --git a/testchar.c b/testchar.c
index e5916d09..e7c4f78f 100644
--- a/testchar.c
+++ b/testchar.c
@@ -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);
}
diff --git a/testdict.c b/testdict.c
index 4d745525..cad516fc 100644
--- a/testdict.c
+++ b/testdict.c
@@ -441,6 +441,5 @@ int main(void)
}
clean_strings();
xmlCleanupParser();
- xmlMemoryDump();
return(ret);
}
diff --git a/testlimits.c b/testlimits.c
index 0680f95b..5400bd80 100644
--- a/testlimits.c
+++ b/testlimits.c
@@ -1622,7 +1622,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_tests, nb_errors, nb_leaks);
}
xmlCleanupParser();
- xmlMemoryDump();
return(ret);
}
diff --git a/testrecurse.c b/testrecurse.c
index a70ca34a..d0a4ed24 100644
--- a/testrecurse.c
+++ b/testrecurse.c
@@ -1208,7 +1208,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_tests, nb_errors, nb_leaks);
}
xmlCleanupParser();
- xmlMemoryDump();
return(ret);
}
diff --git a/xmlcatalog.c b/xmlcatalog.c
index 60ff0019..ee5fc3c7 100644
--- a/xmlcatalog.c
+++ b/xmlcatalog.c
@@ -598,7 +598,6 @@ int main(int argc, char **argv) {
* Cleanup and check for memory leaks
*/
xmlCleanupParser();
- xmlMemoryDump();
return(exit_value);
}
#else
diff --git a/xmllint.c b/xmllint.c
index 398670b4..2368a85f 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -3753,7 +3753,6 @@ main(int argc, char **argv) {
error:
xmlCleanupParser();
- xmlMemoryDump();
return(progresult);
}
diff --git a/xmlmemory.c b/xmlmemory.c
index 9ec4770b..c399cbb0 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -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);
}
diff --git a/xstc/fixup-tests.py b/xstc/fixup-tests.py
index 138d6e0a..09490d10 100755
--- a/xstc/fixup-tests.py
+++ b/xstc/fixup-tests.py
@@ -95,5 +95,4 @@ finally:
libxml2.cleanupParser()
if libxml2.debugMemory(1) != 0:
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
- libxml2.dumpMemory()