1. 05 Apr, 2013 1 commit
    • Daniel Veillard's avatar
      Remove risk of lockup in dictionary initialization · 5fe9e9ed
      Daniel Veillard authored
      Reported by Petr Sumbera <petr.sumbera@oracle.com>
      Two threads entering xmlInitializeDict concurently could lead
      to a lockup due to multiple initializations of the lock used.
      To avoid this problem move this to a new private function
      called from xmlOnceInit() and deprecate the old initalizer.
      Since threaded programs must call xmlInitParser() and this
      will lead to dereference of private data and the call to
      xmlOnceInit() guaranteed to be unique this should be safe now.
      5fe9e9ed
  2. 11 Oct, 2012 1 commit
  3. 15 Sep, 2012 1 commit
    • Friedrich Haubensak's avatar
      Fix a thread portability problem · 3f6cfbd1
      Friedrich Haubensak authored
      cannot compile libxml2-2.9.0 using studio 12.1 compiler on solaris 10
      
      I.M.O. structure initializer (as PTHREAD_ONCE_INIT) cannot be used in
      a structure assignment anyway
      3f6cfbd1
  4. 04 Sep, 2012 1 commit
    • Daniel Veillard's avatar
      Fix reuse of xmlInitParser · 7a2215db
      Daniel Veillard authored
      While xmlCleanupParser() should not be used unless complete control
      is insured over the programe making sure libxml2 is not in use anywhere
      It should still be usable, and allow a sequence of
          xmlInitParser();
          xmlCleanupParser();
      calls if needed, the problem is that the thread key wasn't reallocated
      on subsequent xmlinitParser() calls leading to corruption of pthread
      keys used by the program.
      
      * threads.c: make sure xmlCleanupParser() reset the pthread_once()
                   global variable driving thread key allocation.
      7a2215db
  5. 06 Aug, 2012 1 commit
    • Daniel Richard G's avatar
      Various "make distcheck" and portability fixups · 5706b6d8
      Daniel Richard G authored
      Makefile.am:
      
      * Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make
         variable, it allows overriding the value at the command line, and
         (notably) it avoids a Make parse error in the libxml2_la_LDFLAGS
         assignment when @MODULE_PLATFORM_LIBS@ is empty
      
      * Changed how the THREADS_W32 mechanism switches the build between
         testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL
         allows this to work cleanly and plays well with dependencies
      
      * testapi.c should be specified as BUILT_SOURCES
      
      * Create symlinks to the test/ and result/ subdirs so that the runtests
         target is usable in out-of-source-tree builds
      
      * Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes
      
      * Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f"
         instead of just "rm" is good form
      
      * (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to
         pass
      
      configure.in:
      
      * Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am
      
      * AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been
         superceded by LT_INIT
      
      * Don't rebuild docs by default, as this requires GNU Make (as
         implemented)
      
      * Check for uint32_t as some platforms don't provide it
      
      * Check for some more functions, and undefine HAVE_MMAP if we don't also
         HAVE_MUNMAP (one system I tested on actually needed this)
      
      * Changed THREADS_W32 from a filename insert into an Automake conditional
      
      * The "Copyright" file will not be in the current directory if builddir !=
         srcdir
      
      doc/Makefile.am:
      
      * EXTRA_DIST cannot use wildcards when they refer to generated files; this
         breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU
         Make $(wildcard) directives to build up a list of files, and EXTRA_DIST,
         as a literal expansion of EXTRA_DIST_wc. I also added a new rule,
         "check-extra-dist", to simplify checking that the two variables are
         equivalent. (Note that this works only when builddir == srcdir)
      
         (I can implement this differently if desired; this is just one way of
         doing it)
      
      * Don't define an "all" target; this steps on Automake's toes
      
      * Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for
         dependencies (as Make doesn't process the wildcards otherwise) and
         qualifying appropriate files with $(srcdir)
      
         (Note that $(srcdir) is not needed in the dependencies, thanks to VPATH,
         which we can count on as this is GNU-Make-only code anyway)
      
      doc/devhelp/Makefile.am:
      
      * Qualified appropriate files with $(srcdir)
      
      * Added an "uninstall-local" rule so that "make distcheck" passes
      
      doc/examples/Makefile.am:
      
      * Rather than use a wildcard that doesn't work, use a substitution that
         most Make programs can handle
      
      doc/examples/index.py:
      
      * Do the same here
      
      include/libxml/nanoftp.h:
      
      * Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET:
      
           user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\
           Include$ grep -R INVALID_SOCKET .
           ./WINSOCK.H:#define INVALID_SOCKET  (SOCKET)(~0)
           ./WINSOCK2.H:#define INVALID_SOCKET  (SOCKET)(~0)
      
      include/libxml/xmlversion.h.in:
      
      * Support ancient GCCs (I was actually able to build the library with 2.5
         but for this bit)
      
      python/Makefile.am:
      
      * Expanded CLEANFILES to allow "make distcheck" to pass
      
      python/tests/Makefile.am:
      
      * Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow
         "make distcheck" to pass
      
      testRelax.c:
      
      * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some
         systems have the header but not the function)
      
      testSchemas.c:
      
      * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H
      
      testapi.c:
      
      * Don't use putenv() if it's not available
      
      threads.c:
      
      * This fixes the following build error on Solaris 8:
      
           libtool: compile:  cc -DHAVE_CONFIG_H -I. -I./include -I./include \
           -D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \
           -xarch=v9 -xcrossfile -xO5 -c threads.c  -KPIC -DPIC -o threads.o
           "threads.c", line 442: controlling expressions must have scalar type
           "threads.c", line 512: controlling expressions must have scalar type
           cc: acomp failed for threads.c
           *** Error code 1
      
      trio.c:
      
      * Define isascii() if the system doesn't provide it
      
      trio.h:
      
      * The trio library's HAVE_CONFIG_H header is not the same as LibXML2's
         HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion
      
      win32/configure.js:
      
      * Added support for the LZMA compression option
      
      win32/Makefile.{bcb,mingw,msvc}:
      
      * Added appropriate bits to support WITH_LZMA=1
      
      * Install the header files under $(INCPREFIX)\libxml2\libxml instead of
         $(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools
      
      xml2-config.in:
      
      * @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for
         `xml2-config --libs` to provide a complete set of dependencies
      
      xmllint.c:
      
      * Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
      5706b6d8
  6. 15 Oct, 2010 1 commit
    • Mike Hommey's avatar
      Fix a potential segfault due to weak symbols on pthreads · e6f05099
      Mike Hommey authored
      In xmlInitParser, both __xmlGlobalInitMutexLock and xmlInitGlobals are
      called before xmlInitThreads, and both use pthread symbols.
      __xmlGlobalInitMutexLock does so directly, without checking if the symbol
      exists, and xmlInitGlobals calls xmlNewMutex, which correctly depends on
      libxml_is_threaded... except libxml_is_threaded is still -1 by then...
      And again, when releasing the global mutex in __xmlGlobalInitMutexUnlock,
      the pthread function is called directly.
      
      The patch changes the initialization order and make sure the functions
      are available before calling them
      e6f05099
  7. 30 Sep, 2009 1 commit
  8. 10 Sep, 2009 1 commit
  9. 04 Jun, 2009 1 commit
  10. 21 Feb, 2009 1 commit
  11. 18 Jan, 2009 3 commits
  12. 27 Aug, 2008 1 commit
    • Daniel Veillard's avatar
      fix a small initialization problem raised by Ashwin increase testing · 2cba4158
      Daniel Veillard authored
      * threads.c: fix a small initialization problem raised by Ashwin
      * testapi.c gentest.py: increase testing especially for document
        with an internal subset, and entities
      * tree.c: fix a deallocation issue when unlinking entities from
        a document.
      * valid.c: fix a missing entry point test not found previously.
      * doc/*: regenerated the APIs, docs etc.
      daniel
      
      svn path=/trunk/; revision=3778
      2cba4158
  13. 11 Apr, 2008 1 commit
    • Daniel Veillard's avatar
      added new function xmlSchemaValidCtxtGetParserCtxt based on Holger · dee23485
      Daniel Veillard authored
      * include/libxml/xmlschemas.h xmlschemas.c: added new function
        xmlSchemaValidCtxtGetParserCtxt based on Holger Kaelberer patch
      * doc/apibuild.py doc/*: regenerated the doc, chased why the new
        function didn't got any documentation, added more checking in the
        generator
      * include/libxml/relaxng.h include/libxml/schematron.h
        include/libxml/xmlschemas.h include/libxml/c14n.h
        include/libxml/xmlregexp.h include/libxml/globals.h
        include/libxml/xmlreader.h threads.c xmlschemas.c: various changes
        and cleanups following the new reports
      Daniel
      
      svn path=/trunk/; revision=3738
      dee23485
  14. 24 Mar, 2008 1 commit
  15. 18 Mar, 2008 1 commit
  16. 23 Nov, 2007 1 commit
  17. 16 Nov, 2007 1 commit
  18. 08 Jun, 2007 1 commit
    • Rob Richards's avatar
      *use specified calling convention · e967f0bd
      Rob Richards authored
        for xmlDllMain. Old SDKs (VC6) only support InterlockedCompareExchange.
        add xmlDllMain to header for win32 when building for static dll
      
      svn path=/trunk/; revision=3624
      e967f0bd
  19. 12 Feb, 2007 1 commit
  20. 29 Jun, 2006 1 commit
  21. 04 Sep, 2005 1 commit
    • Daniel Veillard's avatar
      updated the docs and rebuild releasing 2.6.21 removed · 0bcc7f6a
      Daniel Veillard authored
      * NEWS elfgcchack.h testapi.c doc/*: updated the docs and rebuild
        releasing 2.6.21
      * include/libxml/threads.h threads.c: removed xmlIsThreadsEnabled()
      * threads.c include/libxml/threads.h xmllint.c: added the more
        generic xmlHasFeature() as suggested by Bjorn Reese, xmllint uses it.
      Daniel
      0bcc7f6a
  22. 02 Sep, 2005 1 commit
  23. 21 Jul, 2005 1 commit
    • Daniel Veillard's avatar
      applied a patch from Marcus Boerger to fix problems with calling · ffa3c749
      Daniel Veillard authored
      * error.c globals.c parser.c runtest.c testHTML.c testSAX.c
        threads.c valid.c xmllint.c xmlreader.c xmlschemas.c xmlstring.c
        xmlwriter.c include/libxml/parser.h include/libxml/relaxng.h
        include/libxml/valid.h include/libxml/xmlIO.h
        include/libxml/xmlerror.h include/libxml/xmlexports.h
        include/libxml/xmlschemas.h: applied a patch from Marcus Boerger
        to fix problems with calling conventions on Windows this should
        fix #309757
      Daniel
      ffa3c749
  24. 04 May, 2005 1 commit
  25. 01 Apr, 2005 1 commit
    • Daniel Veillard's avatar
      revamped the elfgcchack.h format to cope with gcc4 change of aliasing · 5d4644ef
      Daniel Veillard authored
      * doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h
        format to cope with gcc4 change of aliasing allowed scopes, had
        to add extra informations to doc/libxml2-api.xml to separate
        the header from the c module source.
      * *.c: updated all c library files to add a #define bottom_xxx
        and reimport elfgcchack.h thereafter, and a bit of cleanups.
      * doc//* testapi.c: regenerated when rebuilding the API
      Daniel
      5d4644ef
  26. 25 Feb, 2005 1 commit
  27. 24 Feb, 2005 1 commit
  28. 22 Oct, 2004 1 commit
  29. 22 Sep, 2004 1 commit
  30. 18 Nov, 2003 1 commit
  31. 01 Nov, 2003 1 commit
  32. 29 Oct, 2003 1 commit
  33. 11 Oct, 2003 1 commit
  34. 07 Oct, 2003 1 commit
    • Daniel Veillard's avatar
      cleaning up XPath error reporting that time. applied the two patches for · d96f6d34
      Daniel Veillard authored
      * error.c include/libxml/xmlerror.h include/libxml/xpath.h
        include/libxml/xpathInternals.h xpath.c: cleaning up XPath
        error reporting that time.
      * threads.c: applied the two patches for TLS threads
        on Windows from Jesse Pelton
      * parser.c: tiny safety patch for xmlStrPrintf() make sure the
        return is always zero terminated. Should also help detecting
        passing wrong buffer size easilly.
      * result/VC/* result/valid/rss.xml.err result/valid/xlink.xml.err:
        updated the results to follow the errors string generated by
        last commit.
      Daniel
      d96f6d34
  35. 29 Sep, 2003 1 commit
    • Daniel Veillard's avatar
      Okay this is scary but it is just adding a configure option to disable · a9cce9cd
      Daniel Veillard authored
      * HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c
        encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c
        testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c
        testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c
        xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c
        example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h
        include/libxml/catalog.h include/libxml/debugXML.h
        include/libxml/entities.h include/libxml/nanohttp.h
        include/libxml/relaxng.h include/libxml/tree.h
        include/libxml/valid.h include/libxml/xmlIO.h
        include/libxml/xmlschemas.h include/libxml/xmlversion.h.in
        include/libxml/xpathInternals.h python/libxml.c:
        Okay this is scary but it is just adding a configure option
        to disable output, this touches most of the files.
      Daniel
      a9cce9cd
  36. 11 Sep, 2003 1 commit
  37. 28 Aug, 2003 1 commit
  38. 15 Aug, 2003 1 commit