mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03: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:
28
Makefile.am
28
Makefile.am
@@ -233,7 +233,6 @@ endif
|
|||||||
tests: $(OLD_TESTS)
|
tests: $(OLD_TESTS)
|
||||||
|
|
||||||
Scripttests : xmllint$(EXEEXT)
|
Scripttests : xmllint$(EXEEXT)
|
||||||
@(echo > .memdump)
|
|
||||||
@echo "## Scripts regression tests"
|
@echo "## Scripts regression tests"
|
||||||
@echo "## Some of the base computations may be different if srcdir != ."
|
@echo "## Some of the base computations may be different if srcdir != ."
|
||||||
-@(for i in $(srcdir)/test/scripts/*.script ; do \
|
-@(for i in $(srcdir)/test/scripts/*.script ; do \
|
||||||
@@ -243,10 +242,8 @@ Scripttests : xmllint$(EXEEXT)
|
|||||||
if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \
|
if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \
|
||||||
echo New test file $$name ; \
|
echo New test file $$name ; \
|
||||||
$(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > $(srcdir)/result/scripts/$$name 2> $(srcdir)/result/scripts/$$name.err ; \
|
$(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 \
|
else \
|
||||||
log=`$(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > result.$$name 2> result.$$name.err ; \
|
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 result.$$name ; \
|
||||||
diff $(srcdir)/result/scripts/$$name.err result.$$name.err` ; \
|
diff $(srcdir)/result/scripts/$$name.err result.$$name.err` ; \
|
||||||
if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
|
if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
|
||||||
@@ -254,7 +251,6 @@ Scripttests : xmllint$(EXEEXT)
|
|||||||
fi ; fi ; done)
|
fi ; fi ; done)
|
||||||
|
|
||||||
Catatests : xmlcatalog$(EXEEXT)
|
Catatests : xmlcatalog$(EXEEXT)
|
||||||
@(echo > .memdump)
|
|
||||||
@echo "## Catalog regression tests"
|
@echo "## Catalog regression tests"
|
||||||
-@(for i in $(srcdir)/test/catalogs/*.script ; do \
|
-@(for i in $(srcdir)/test/catalogs/*.script ; do \
|
||||||
name=`basename $$i .script`; \
|
name=`basename $$i .script`; \
|
||||||
@@ -263,10 +259,8 @@ Catatests : xmlcatalog$(EXEEXT)
|
|||||||
if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
|
if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
|
||||||
echo New test file $$name ; \
|
echo New test file $$name ; \
|
||||||
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
|
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
|
||||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
|
||||||
else \
|
else \
|
||||||
log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \
|
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` ; \
|
diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
|
||||||
if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
|
if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
|
||||||
rm result.$$name ; \
|
rm result.$$name ; \
|
||||||
@@ -278,33 +272,22 @@ Catatests : xmlcatalog$(EXEEXT)
|
|||||||
if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
|
if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
|
||||||
echo New test file $$name ; \
|
echo New test file $$name ; \
|
||||||
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \
|
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \
|
||||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
|
||||||
else \
|
else \
|
||||||
log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > result.$$name ; \
|
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` ; \
|
diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
|
||||||
if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
|
if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
|
||||||
rm result.$$name ; \
|
rm result.$$name ; \
|
||||||
fi ; fi ; done)
|
fi ; fi ; done)
|
||||||
@echo "## Add and del operations on XML Catalogs"
|
@echo "## Add and del operations on XML Catalogs"
|
||||||
-@($(CHECKER) $(top_builddir)/xmlcatalog --create --noout $(srcdir)/result/catalogs/mycatalog; \
|
-@($(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; \
|
$(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; \
|
$(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; \
|
$(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; \
|
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; \
|
$(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; \
|
$(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; \
|
$(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; \
|
diff result/catalogs/mycatalog.empty $(srcdir)/result/catalogs/mycatalog; \
|
||||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
|
|
||||||
rm -f $(srcdir)/result/catalogs/mycatalog)
|
rm -f $(srcdir)/result/catalogs/mycatalog)
|
||||||
|
|
||||||
dba100000.xml: dbgenattr.pl
|
dba100000.xml: dbgenattr.pl
|
||||||
@@ -319,30 +302,21 @@ Timingtests: xmllint$(EXEEXT) dba100000.xml
|
|||||||
@echo "## 3/ repeated DOM parsing"
|
@echo "## 3/ repeated DOM parsing"
|
||||||
@echo "## 4/ repeated DOM validation"
|
@echo "## 4/ repeated DOM validation"
|
||||||
-@($(top_builddir)/xmllint --stream --timing dba100000.xml; \
|
-@($(top_builddir)/xmllint --stream --timing dba100000.xml; \
|
||||||
MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
|
|
||||||
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
|
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
|
||||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
|
||||||
exit 0)
|
exit 0)
|
||||||
-@($(top_builddir)/xmllint --stream --timing --memory dba100000.xml; \
|
-@($(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 ; \
|
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
|
||||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
|
||||||
exit 0)
|
exit 0)
|
||||||
-@($(top_builddir)/xmllint --noout --timing --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
|
-@($(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 ; \
|
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
|
||||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
|
||||||
exit 0)
|
exit 0)
|
||||||
|
|
||||||
VTimingtests: xmllint$(EXEEXT)
|
VTimingtests: xmllint$(EXEEXT)
|
||||||
-@($(top_builddir)/xmllint --noout --timing --valid --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
|
-@($(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 ; \
|
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
|
||||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
|
||||||
exit 0)
|
exit 0)
|
||||||
|
|
||||||
Schematrontests: xmllint$(EXEEXT)
|
Schematrontests: xmllint$(EXEEXT)
|
||||||
@(echo > .memdump)
|
|
||||||
@echo "## Schematron regression tests"
|
@echo "## Schematron regression tests"
|
||||||
-@(for i in $(srcdir)/test/schematron/*.sct ; do \
|
-@(for i in $(srcdir)/test/schematron/*.sct ; do \
|
||||||
name=`basename $$i | sed 's+\.sct++'`; \
|
name=`basename $$i | sed 's+\.sct++'`; \
|
||||||
@@ -355,11 +329,9 @@ Schematrontests: xmllint$(EXEEXT)
|
|||||||
$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
|
$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
|
||||||
> $(srcdir)/result/schematron/"$$name"_"$$xno" \
|
> $(srcdir)/result/schematron/"$$name"_"$$xno" \
|
||||||
2> $(srcdir)/result/schematron/"$$name"_"$$xno".err; \
|
2> $(srcdir)/result/schematron/"$$name"_"$$xno".err; \
|
||||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
|
||||||
else \
|
else \
|
||||||
log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
|
log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
|
||||||
> res.$$name 2> err.$$name;\
|
> res.$$name 2> err.$$name;\
|
||||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
|
||||||
diff $(srcdir)/result/schematron/"$$name"_"$$xno" \
|
diff $(srcdir)/result/schematron/"$$name"_"$$xno" \
|
||||||
res.$$name;\
|
res.$$name;\
|
||||||
diff $(srcdir)/result/schematron/"$$name"_"$$xno".err \
|
diff $(srcdir)/result/schematron/"$$name"_"$$xno".err \
|
||||||
|
@@ -395,4 +395,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -419,4 +419,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -421,4 +421,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -2083,7 +2083,6 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
xmlNanoFTPClose(ctxt);
|
xmlNanoFTPClose(ctxt);
|
||||||
xmlMemoryDump();
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
#endif /* STANDALONE */
|
#endif /* STANDALONE */
|
||||||
|
@@ -1912,7 +1912,6 @@ int main(int argc, char **argv) {
|
|||||||
"\tusage %s [ URL [ filename ] ]\n", argv[0]);
|
"\tusage %s [ URL [ filename ] ]\n", argv[0]);
|
||||||
}
|
}
|
||||||
xmlNanoHTTPCleanup();
|
xmlNanoHTTPCleanup();
|
||||||
xmlMemoryDump();
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
#endif /* STANDALONE */
|
#endif /* STANDALONE */
|
||||||
|
@@ -31,4 +31,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -56,4 +56,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -47,4 +47,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -53,4 +53,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -45,4 +45,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -28,5 +28,4 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
|
||||||
|
@@ -48,4 +48,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -26,5 +26,4 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
|
||||||
|
@@ -110,4 +110,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -59,4 +59,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -107,4 +107,3 @@ if __name__ == '__main__':
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -32,4 +32,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -61,4 +61,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -62,4 +62,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -443,4 +443,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -334,4 +334,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -157,4 +157,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -47,4 +47,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -46,4 +46,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -125,4 +125,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -98,4 +98,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -33,4 +33,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -53,4 +53,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -83,4 +83,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -29,4 +29,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -44,5 +44,4 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
|
||||||
|
@@ -40,5 +40,4 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
|
||||||
|
@@ -48,5 +48,4 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
|
||||||
|
@@ -147,4 +147,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -135,4 +135,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -96,4 +96,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -25,4 +25,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -15,7 +15,6 @@ class TestCase(unittest.TestCase):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
libxml2.cleanupParser()
|
libxml2.cleanupParser()
|
||||||
if libxml2.debugMemory(1) != 0:
|
if libxml2.debugMemory(1) != 0:
|
||||||
libxml2.dumpMemory()
|
|
||||||
self.fail("Memory leak %d bytes" % (libxml2.debugMemory(1),))
|
self.fail("Memory leak %d bytes" % (libxml2.debugMemory(1),))
|
||||||
else:
|
else:
|
||||||
print("OK")
|
print("OK")
|
||||||
|
@@ -38,4 +38,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -38,4 +38,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -60,4 +60,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -55,5 +55,4 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
|
||||||
|
@@ -72,5 +72,4 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
|
||||||
|
@@ -79,5 +79,4 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
|
||||||
|
@@ -79,4 +79,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -141,4 +141,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -48,4 +48,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -46,4 +46,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -51,5 +51,3 @@ if leakedbytes == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak", leakedbytes, "bytes")
|
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")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -54,4 +54,3 @@ if libxml2.debugMemory(1) == 0:
|
|||||||
print("OK")
|
print("OK")
|
||||||
else:
|
else:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
@@ -522,7 +522,6 @@ xsdTestCase(xmlNodePtr tst) {
|
|||||||
if ((mem != xmlMemUsed()) && (extraMemoryFromResolver == 0)) {
|
if ((mem != xmlMemUsed()) && (extraMemoryFromResolver == 0)) {
|
||||||
test_log("Validation of instance line %ld leaked %d\n",
|
test_log("Validation of instance line %ld leaked %d\n",
|
||||||
xmlGetLineNo(tmp), xmlMemUsed() - mem);
|
xmlGetLineNo(tmp), xmlMemUsed() - mem);
|
||||||
xmlMemoryDump();
|
|
||||||
nb_leaks++;
|
nb_leaks++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -577,7 +576,6 @@ xsdTestCase(xmlNodePtr tst) {
|
|||||||
if ((mem != xmlMemUsed()) && (extraMemoryFromResolver == 0)) {
|
if ((mem != xmlMemUsed()) && (extraMemoryFromResolver == 0)) {
|
||||||
test_log("Validation of instance line %ld leaked %d\n",
|
test_log("Validation of instance line %ld leaked %d\n",
|
||||||
xmlGetLineNo(tmp), xmlMemUsed() - mem);
|
xmlGetLineNo(tmp), xmlMemUsed() - mem);
|
||||||
xmlMemoryDump();
|
|
||||||
nb_leaks++;
|
nb_leaks++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1157,7 +1155,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||||||
}
|
}
|
||||||
xmlXPathFreeContext(ctxtXPath);
|
xmlXPathFreeContext(ctxtXPath);
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
if (logfile != NULL)
|
if (logfile != NULL)
|
||||||
fclose(logfile);
|
fclose(logfile);
|
||||||
|
@@ -5308,7 +5308,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||||||
nb_tests, nb_errors, nb_leaks);
|
nb_tests, nb_errors, nb_leaks);
|
||||||
}
|
}
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
@@ -586,7 +586,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||||||
}
|
}
|
||||||
xmlXPathFreeContext(ctxtXPath);
|
xmlXPathFreeContext(ctxtXPath);
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
if (logfile != NULL)
|
if (logfile != NULL)
|
||||||
fclose(logfile);
|
fclose(logfile);
|
||||||
|
@@ -2053,7 +2053,6 @@ main(void)
|
|||||||
xmlFreeDoc(instance);
|
xmlFreeDoc(instance);
|
||||||
|
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
@@ -70,8 +70,6 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||||||
|
|
||||||
xmlModuleClose(module);
|
xmlModuleClose(module);
|
||||||
|
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -352,14 +352,12 @@ int main(int argc, char **argv) {
|
|||||||
if (test_get_malloc_blocks_outstanding () > 0) {
|
if (test_get_malloc_blocks_outstanding () > 0) {
|
||||||
fprintf (stdout, "%d blocks leaked\n",
|
fprintf (stdout, "%d blocks leaked\n",
|
||||||
test_get_malloc_blocks_outstanding ());
|
test_get_malloc_blocks_outstanding ());
|
||||||
xmlMemoryDump();
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
files ++;
|
files ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -135,7 +135,6 @@ main(void)
|
|||||||
threadParams[i].filename);
|
threadParams[i].filename);
|
||||||
}
|
}
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
@@ -198,7 +197,6 @@ main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
@@ -174,8 +174,8 @@ int main(int argc, char **argv) {
|
|||||||
mem = xmlMemUsed();
|
mem = xmlMemUsed();
|
||||||
if ((blocks != 0) || (mem != 0)) {
|
if ((blocks != 0) || (mem != 0)) {
|
||||||
printf("testapi leaked %d bytes in %d blocks\n", mem, blocks);
|
printf("testapi leaked %d bytes in %d blocks\n", mem, blocks);
|
||||||
|
ret = 1;
|
||||||
}
|
}
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
return (ret != 0);
|
return (ret != 0);
|
||||||
}
|
}
|
||||||
|
@@ -741,9 +741,5 @@ int main(void) {
|
|||||||
* Cleanup function for the XML library.
|
* Cleanup function for the XML library.
|
||||||
*/
|
*/
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
/*
|
|
||||||
* this is to debug memory for regression tests
|
|
||||||
*/
|
|
||||||
xmlMemoryDump();
|
|
||||||
return(ret ? 1 : 0);
|
return(ret ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
@@ -441,6 +441,5 @@ int main(void)
|
|||||||
}
|
}
|
||||||
clean_strings();
|
clean_strings();
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
@@ -1622,7 +1622,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||||||
nb_tests, nb_errors, nb_leaks);
|
nb_tests, nb_errors, nb_leaks);
|
||||||
}
|
}
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
@@ -1208,7 +1208,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||||||
nb_tests, nb_errors, nb_leaks);
|
nb_tests, nb_errors, nb_leaks);
|
||||||
}
|
}
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
@@ -598,7 +598,6 @@ int main(int argc, char **argv) {
|
|||||||
* Cleanup and check for memory leaks
|
* Cleanup and check for memory leaks
|
||||||
*/
|
*/
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
return(exit_value);
|
return(exit_value);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@@ -3753,7 +3753,6 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
return(progresult);
|
return(progresult);
|
||||||
}
|
}
|
||||||
|
@@ -160,7 +160,6 @@ xmlMallocLoc(size_t size, const char * file, int line)
|
|||||||
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
|
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlMallocLoc : Unsigned overflow\n");
|
"xmlMallocLoc : Unsigned overflow\n");
|
||||||
xmlMemoryDump();
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +168,6 @@ xmlMallocLoc(size_t size, const char * file, int line)
|
|||||||
if (!p) {
|
if (!p) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlMallocLoc : Out of free space\n");
|
"xmlMallocLoc : Out of free space\n");
|
||||||
xmlMemoryDump();
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
p->mh_tag = MEMTAG;
|
p->mh_tag = MEMTAG;
|
||||||
@@ -236,7 +234,6 @@ xmlMallocAtomicLoc(size_t size, const char * file, int line)
|
|||||||
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
|
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlMallocAtomicLoc : Unsigned overflow\n");
|
"xmlMallocAtomicLoc : Unsigned overflow\n");
|
||||||
xmlMemoryDump();
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,7 +242,6 @@ xmlMallocAtomicLoc(size_t size, const char * file, int line)
|
|||||||
if (!p) {
|
if (!p) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlMallocAtomicLoc : Out of free space\n");
|
"xmlMallocAtomicLoc : Out of free space\n");
|
||||||
xmlMemoryDump();
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
p->mh_tag = MEMTAG;
|
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)) {
|
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlReallocLoc : Unsigned overflow\n");
|
"xmlReallocLoc : Unsigned overflow\n");
|
||||||
xmlMemoryDump();
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -501,7 +496,6 @@ xmlMemStrdupLoc(const char *str, const char *file, int line)
|
|||||||
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
|
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlMemStrdupLoc : Unsigned overflow\n");
|
"xmlMemStrdupLoc : Unsigned overflow\n");
|
||||||
xmlMemoryDump();
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -95,5 +95,4 @@ finally:
|
|||||||
libxml2.cleanupParser()
|
libxml2.cleanupParser()
|
||||||
if libxml2.debugMemory(1) != 0:
|
if libxml2.debugMemory(1) != 0:
|
||||||
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
||||||
libxml2.dumpMemory()
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user