From andrew.pennebaker@gmail.com Mon Jun 2 06:07:09 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 513AF769FA for ; Mon, 2 Jun 2014 06:07:09 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.699 X-Spam-Level: X-Spam-Status: No, score=-2.699 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LbRUMD3cTAhS for ; Mon, 2 Jun 2014 06:07:08 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by restaurant.gnome.org (Postfix) with ESMTP id E23F6762FC for ; Mon, 2 Jun 2014 06:06:47 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id tp5so4063983ieb.39 for ; Sun, 01 Jun 2014 23:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ODGT0tS7Y9tEiN+2JWIEEykaBXQB2vMRyKTm2YxiQxk=; b=oidpS43ax8UN/P8lPMV2BpzSDUM7nTI28EZNoE4JXNVk+oVCAHTCz+lXda1hsBNAXC Zb9J3SrrXzz7CSa+7VOVJEqXGbzfUXBse7cFy73LkO1qGtWPR4xkBnHFuq4rGuOYxwbz kXU/IjqT1RAm+PlH33hFh+gVm8KOB0SOSPRN6YnPkpW2F0Xgm6fWzwQ/Tqe+53GeuWVK RbjsgDQcPldaCOOOWr6KwJp/seyy+4oE5MJjI9KCT0F1LGuZfjESMk2H3WG7WFAN2Fgf 7yCaGnU7UzCJp1QxbQcpvi6G/9nssXBCT1FZEz+l6s+j240sdm7KxjUaJd24Oupp53Jb 1T6w== MIME-Version: 1.0 X-Received: by 10.50.32.70 with SMTP id g6mr16865807igi.0.1401689205962; Sun, 01 Jun 2014 23:06:45 -0700 (PDT) Received: by 10.42.120.70 with HTTP; Sun, 1 Jun 2014 23:06:45 -0700 (PDT) Date: Mon, 2 Jun 2014 02:06:45 -0400 Message-ID: From: Andrew Pennebaker To: libxml Content-Type: multipart/alternative; boundary=047d7b10ca553537fd04fad43381 Subject: [xml] xmllint: accept XML input from stdin, please X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 06:07:09 -0000 --047d7b10ca553537fd04fad43381 Content-Type: text/plain; charset=UTF-8 xmllint would play much more nicely with other Unix tools if XML could be piped into stdin when needed. Could the next version add this feature? -- Cheers, Andrew Pennebaker www.yellosoft.us --047d7b10ca553537fd04fad43381 Content-Type: text/html; charset=UTF-8
xmllint would play much more nicely with other Unix tools if XML could be piped into stdin when needed. Could the next version add this feature?

--
Cheers,

Andrew Pennebaker
--047d7b10ca553537fd04fad43381-- From alex@alex.org.uk Mon Jun 2 06:34:03 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 780E176A06 for ; Mon, 2 Jun 2014 06:34:03 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.201 X-Spam-Level: X-Spam-Status: No, score=-4.201 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YNxVgvhtvgNi for ; Mon, 2 Jun 2014 06:34:02 +0000 (UTC) X-Greylist: delayed 436 seconds by postgrey-1.34 at restaurant.gnome.org; Mon, 02 Jun 2014 06:34:02 UTC Received: from mail.avalus.com (mail.avalus.com [89.16.176.221]) by restaurant.gnome.org (Postfix) with ESMTP id 98651769FA for ; Mon, 2 Jun 2014 06:33:42 +0000 (UTC) Received: by mail.avalus.com (Postfix) with ESMTPSA id 381F1C56065; Mon, 2 Jun 2014 07:26:14 +0100 (BST) Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Alex Bligh In-Reply-To: Date: Mon, 2 Jun 2014 07:26:13 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <2D681352-58F5-4C97-8345-79C5376A5AE9@alex.org.uk> References: To: Andrew Pennebaker X-Mailer: Apple Mail (2.1085) Cc: libxml Subject: Re: [xml] xmllint: accept XML input from stdin, please X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 06:34:03 -0000 On 2 Jun 2014, at 07:06, Andrew Pennebaker wrote: > xmllint would play much more nicely with other Unix tools if XML could = be piped into stdin when needed. Could the next version add this = feature? It can and has been able to for a good while. $ xmllint --version xmllint: using libxml version 20627 compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 = FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv = ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug = Zlib $ echo '' | xmllint --format - --=20 Alex Bligh From andrew.pennebaker@gmail.com Mon Jun 2 14:49:44 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id DB9817631A for ; Mon, 2 Jun 2014 14:49:44 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.699 X-Spam-Level: X-Spam-Status: No, score=-2.699 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yYUVyudG20if for ; Mon, 2 Jun 2014 14:49:43 +0000 (UTC) Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) by restaurant.gnome.org (Postfix) with ESMTP id 424BF762FC for ; Mon, 2 Jun 2014 14:49:22 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id rp18so4348538iec.26 for ; Mon, 02 Jun 2014 07:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=v1CEc3nPHKU+EXMz1bAFepfJSpBM47QwWifTritSy3c=; b=qpbt0kycfuOtbWLv8ZP6LmgmQttBzKInB96EanGlnymEGHHLu2AApJz1fHpo8usrtX A2rBMOAlTG6dgvRulffaJrOnogLJVnPxQh1kYJ1KgnK3+ei9dASBWTrPOwSbACx8cChw xucG0hCbE+OWMPUS5wxusnz84C7SiPZo2Ex2KACbw9GcIYvPlfmbzDcuZGQ7buGbi2nX ZF1jQp5tB45S2wrhP1yeazf/rFMDx5xIKiRDWB+fPS4FZUwt+DlreoceP9TU558/zKoq D3Sh3Ehr1FCchverbLHlo9mi24jIYqs5PI2TFWIdp8lbWnBH+RM/AQaYg+gFsGFrUwGy kyQg== MIME-Version: 1.0 X-Received: by 10.50.45.38 with SMTP id j6mr10046644igm.10.1401720561400; Mon, 02 Jun 2014 07:49:21 -0700 (PDT) Received: by 10.42.120.70 with HTTP; Mon, 2 Jun 2014 07:49:21 -0700 (PDT) In-Reply-To: <2D681352-58F5-4C97-8345-79C5376A5AE9@alex.org.uk> References: <2D681352-58F5-4C97-8345-79C5376A5AE9@alex.org.uk> Date: Mon, 2 Jun 2014 10:49:21 -0400 Message-ID: From: Andrew Pennebaker To: Alex Bligh Content-Type: multipart/alternative; boundary=089e0111b1ee23024b04fadb8035 Cc: libxml Subject: Re: [xml] xmllint: accept XML input from stdin, please X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 14:49:44 -0000 --089e0111b1ee23024b04fadb8035 Content-Type: text/plain; charset=UTF-8 Ah, the dash. "xmllint [options] -", it's right there at the top of the man page. For some reason, I couldn't grep it :P On Mon, Jun 2, 2014 at 2:26 AM, Alex Bligh wrote: > > On 2 Jun 2014, at 07:06, Andrew Pennebaker wrote: > > > xmllint would play much more nicely with other Unix tools if XML could > be piped into stdin when needed. Could the next version add this feature? > > It can and has been able to for a good while. > > $ xmllint --version > xmllint: using libxml version 20627 > compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 > FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv > ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib > $ echo '' | xmllint --format - > > > > > > -- > Alex Bligh > > > > > -- Cheers, Andrew Pennebaker www.yellosoft.us --089e0111b1ee23024b04fadb8035 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ah, the dash. "xmllint [options] -", it's ri= ght there at the top of the man page. For some reason, I couldn't grep = it :P


On= Mon, Jun 2, 2014 at 2:26 AM, Alex Bligh <alex@alex.org.uk> w= rote:

On 2 Jun 2014, at 07:06, Andrew Pennebaker wrote:

> xmllint would play much more nicely with other Unix tools if XML could= be piped into stdin when needed. Could the next version add this feature?<= br>
It can and has been able to for a good while.

$ xmllint --version
xmllint: using libxml version 20627
=C2=A0 =C2=A0compiled with: Threads Tree Output Push Reader Patterns Writer= SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude I= conv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debu= g Zlib
$ echo '<hello><there/></hello>' | xmllint --form= at -
<?xml version=3D"1.0"?>
<hello>
=C2=A0 <there/>
</hello>

--
Alex Bligh







--
Cheers,

Andrew Pennebaker
--089e0111b1ee23024b04fadb8035-- From jori@enea.com Wed Jun 4 13:37:47 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 1A1CB762AB for ; Wed, 4 Jun 2014 13:37:47 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=2 tests=[BAYES_00=-1.9] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f8Lp1liAFiJe for ; Wed, 4 Jun 2014 13:37:45 +0000 (UTC) X-Greylist: delayed 324 seconds by postgrey-1.34 at restaurant.gnome.org; Wed, 04 Jun 2014 13:37:44 UTC Received: from mx-3.enea.com (sestofw01.enea.se [192.36.1.252]) by restaurant.gnome.org (Postfix) with SMTP id D91B7762EC for ; Wed, 4 Jun 2014 13:37:24 +0000 (UTC) Received: from sestows930 (172.16.140.24) by smtp.enea.com (172.21.1.209) with Microsoft SMTP Server id 14.3.158.1; Wed, 4 Jun 2014 15:31:56 +0200 Received: by sestows930 (Postfix, from userid 1000) id 9ECFE181271; Wed, 4 Jun 2014 15:31:56 +0200 (CEST) Date: Wed, 4 Jun 2014 15:31:56 +0200 From: Jonas Eriksson To: Message-ID: <20140604133151.GA16771@enea.com> References: <1394093597-5622-1-git-send-email-jonas.eriksson@enea.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1394093597-5622-1-git-send-email-jonas.eriksson@enea.com> User-Agent: Mutt/1.5.23 (2014-03-12) Received-SPF: None (SESTOEX03.enea.se: jonas.eriksson@enea.com does not designate permitted sender hosts) Subject: Re: [xml] [PATCH] configure: Add --with-python-install-dir X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 13:37:47 -0000 Hi, Top-posting a little 'ping' for this patch. /Jonas On Thu, Mar 06, 2014 at 09:13:17 +0100 Jonas Eriksson wrote: > Cross-compiling the python bindings is a bit difficult today, as the > configure script will figure out the site packages dir > (PYTHON_SITE_PACKAGES) by either: > > - Generating the path to the site-package target directories using > libdir, and see if it exists. As it is not possible to point to the > full path of the sysroot, since that will yield the wrong install > path, and that the directory does not neccessarily exist on the host, > this approach will not work. > > - Fetch the site packages dir from the python interpreter as pointed to > by --with-python. Since this python interpreter will point to the > sysroot, the install dir generated will be inside the sysroot and thus > not work. > > This patch approaches the problem by adding the possibility of > explicitly stating the install dir of the python packages, leaving it up > to the cross-compilation environment to specify it. The patch does not > affect the default case (non-cross compilation). > > Signed-off-by: Jonas Eriksson > --- > configure.in | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/configure.in b/configure.in > index ecaa403..21ad1e7 100644 > --- a/configure.in > +++ b/configure.in > @@ -148,6 +148,9 @@ AC_ARG_WITH(push, > [ --with-push add the PUSH parser interfaces (on)]) > AC_ARG_WITH(python, > [ --with-python[[=DIR]] build Python bindings if found]) > +AC_ARG_WITH(python_install_dir, > +[ --with-python-install-dir=DIR > + install Python bindings in DIR]) > AC_ARG_WITH(reader, > [ --with-reader add the xmlReader parsing interface (on)]) > AC_ARG_WITH(readline, > @@ -866,6 +869,10 @@ if test "$with_python" != "no" ; then > fi > fi > fi > + if test "$with_python_install_dir" != "" > + then > + PYTHON_SITE_PACKAGES="$with_python_install_dir" > + fi > if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = "" > then > if test -d $libdir/python$PYTHON_VERSION/site-packages > -- > 1.9.0 From stilor@att.net Mon Jun 9 01:32:23 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id E068C76967 for ; Mon, 9 Jun 2014 01:32:23 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.099 X-Spam-Level: X-Spam-Status: No, score=-0.099 tagged_above=-999 required=2 tests=[BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bD2c94s4fsgi for ; Mon, 9 Jun 2014 01:32:22 +0000 (UTC) Received: from nm9-vm9.access.bullet.mail.gq1.yahoo.com (nm9-vm9.access.bullet.mail.gq1.yahoo.com [216.39.63.247]) by restaurant.gnome.org (Postfix) with ESMTP id 98423768D8 for ; Mon, 9 Jun 2014 01:32:01 +0000 (UTC) Received: from [216.39.60.167] by nm9.access.bullet.mail.gq1.yahoo.com with NNFMP; 09 Jun 2014 01:32:00 -0000 Received: from [98.138.226.243] by tm3.access.bullet.mail.gq1.yahoo.com with NNFMP; 09 Jun 2014 01:31:59 -0000 Received: from [127.0.0.1] by smtp114.sbc.mail.ne1.yahoo.com with NNFMP; 09 Jun 2014 01:31:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1402277519; bh=ykAansL7UAe7bbHLOsznrFOJDYzhxvmMJ/gCbdEpZ34=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:From:To:Subject:Date:Message-ID:User-Agent:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=aU/snWCVi/Le4YXbyJRm++nVgfA1h7AOlMLUAkXr82O/vETjafWdJBOqGnhbghbTXmgzOhVVeIKhsZZ7+YuSf68b8S6ovlkyuleJUEdb1frT1WoDYf0GkErTVKqRqchOOeR/RtELproU+1Etw11BvFfCt8hBxVwbe0/o/MjgvKo= X-Yahoo-Newman-Id: 810636.46875.bm@smtp114.sbc.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: tpOMcwMVM1l8ffVVR7DgIWx0YU7NbdMzrcRA4Cm8orW_jxw 8hP4l_6U9kySeRtYHUmxby9wRUV72eymURQQcWgslJeglKb5AwdBejcnJXxJ sU5m92fWyzsyW.2m2hIavZQWnF5Jl7ZjUOXYpsdyJOIES8mY9QNPzZLbgyuk JRZM.JTotdEX4DvcWkWdCJZPDqJaeh5sNA5uQpX6nI6Dj3O7bdW30N.fxP.9 J.bsb4v8cgSLgHbCwvGC2OTWeyFEu6DeFAP_dIpzQAcSD97KixZzhywDpPAG 5MpZygifH7n7iBXxgpl.F.vWAS0NUs6q_6sERH9lZ7HAkWXlT.QV788pOl99 8TJtICHjDCR_0y3YK0SgCNKCerIp.cLBDQFLSoDt4c0VgPaGfcCdOL4lT.Zq P7MtKI7A1OQQmy7D6a7l2zYi.soOJIZMIooh_lbGAGu8QcKYHPJLMWemeDQu n7UjGDbtE609B_Nh4zjsWDAFRa5_a5yLCejdzA28oujDOxlAUIFGvEkAhuPs GOFjU1MPqCnEQjyTWKolssvgDYz10fYie.uo- X-Yahoo-SMTP: 0h0Q7euswBD_g.kcEqbzJWRFfrba801gq1M1 X-Rocket-Received: from mistral.localnet (stilor@162.232.170.164 with plain [98.138.84.52]) by smtp114.sbc.mail.ne1.yahoo.com with SMTP; 09 Jun 2014 01:31:59 +0000 UTC From: Alexey Neyman To: xml@gnome.org Date: Sun, 08 Jun 2014 18:31:57 -0700 Message-ID: <7017392.2WppFRtCun@mistral> User-Agent: KMail/4.13 (Linux/3.13.0-24-generic; KDE/4.13.0; x86_64; ; ) In-Reply-To: <2348887.1LleT1bt8j@mistral> References: <2348887.1LleT1bt8j@mistral> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="nextPart1926933.2guKzBsmXy" Content-Transfer-Encoding: 7Bit Subject: Re: [xml] [BUG] [PATCH] --postvalid broken after CVE-2014-0191 fix X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 01:32:24 -0000 This is a multi-part message in MIME format. --nextPart1926933.2guKzBsmXy Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" PING! On Tuesday, May 20, 2014 10:06:27 PM Alexey Neyman wrote: > [More investigation follows. Writing from a different machine, so cannot > reply to my own email] > > The issue, brief summary: upgrade of libxml2 from 2.7.6-14.el6 to > 2.7.6-14.el6_5.1 (RHEL6) broke the --postvalid/--dtdvalid options. > > Minimal test case: > > [a.xml] > > > > > > > > > [a.dtd] > > > %base.dtd; > > > [b.dtd] > > > > This command works: > xmllint --valid --noout --dtdvalid a.dtd a.xml > > This command doesn't: > xmllint --postvalid --noout --dtdvalid a.dtd a.xml > a.xml:5: element b: validity error : No declaration for element b > Document a.xml does not validate against a.dtd > > The problem: > 1. With --postvalid (and similarly treated options --dtdvalid, > --dtdvalidfpi) the XML_PARSE_DTDVALID is not set. Instead, > XML_PARSE_DTDLOAD is set (the validation is performed after loading of the > XML document). Solution: the > xmlParserHandlePEReference() should also check for XML_PARSE_DTDLOAD or the > parsed entities defined in the nested DTDs will not load. > > 2. Even with parsed entities loaded, the validation then fails: the > xmlParserHandlePEReference() is called during the post-validation with the > ctxt->options equal to zero when loading a separate DTD (e.g. due to > --dtdvalid option) via the xmlSAXParseDTD(). Solution: xmlSAXParseDTD() > should set the ctxt->options to XML_PARSE_DTDLOAD - after all, > xmlSAXParseDTD *is* loading the DTD. > > 3. The comment in the xmlParserHandlePEReference() is an obvious copy-paste: > it refers to parsed entities while the code actually handles parameter > entities. Solution: fix the comment :) > > Updated patch attached (against RHEL version of 2.7.6 - will update to git > version of libxml2 if needed). > > Regards, > Alexey. --nextPart1926933.2guKzBsmXy Content-Transfer-Encoding: 7Bit Content-Type: text/html; charset="us-ascii"

PING!

 

On Tuesday, May 20, 2014 10:06:27 PM Alexey Neyman wrote:

> [More investigation follows. Writing from a different machine, so cannot

> reply to my own email]

>

> The issue, brief summary: upgrade of libxml2 from 2.7.6-14.el6 to

> 2.7.6-14.el6_5.1 (RHEL6) broke the --postvalid/--dtdvalid options.

>

> Minimal test case:

>

> [a.xml]

> <?xml version="1.0"?>

> <!-- vi: set sw=2 : -->

> <!DOCTYPE a SYSTEM "a.dtd">

> <a>

> <b/>

> </a>

>

>

> [a.dtd]

> <!ELEMENT a (b|c)>

> <!ENTITY % base.dtd SYSTEM "b.dtd">

> %base.dtd;

>

>

> [b.dtd]

> <!ELEMENT b EMPTY>

> <!ELEMENT c EMPTY>

>

> This command works:

> xmllint --valid --noout --dtdvalid a.dtd a.xml

>

> This command doesn't:

> xmllint --postvalid --noout --dtdvalid a.dtd a.xml

> a.xml:5: element b: validity error : No declaration for element b

> Document a.xml does not validate against a.dtd

>

> The problem:

> 1. With --postvalid (and similarly treated options --dtdvalid,

> --dtdvalidfpi) the XML_PARSE_DTDVALID is not set. Instead,

> XML_PARSE_DTDLOAD is set (the validation is performed after loading of the

> XML document). Solution: the

> xmlParserHandlePEReference() should also check for XML_PARSE_DTDLOAD or the

> parsed entities defined in the nested DTDs will not load.

>

> 2. Even with parsed entities loaded, the validation then fails: the

> xmlParserHandlePEReference() is called during the post-validation with the

> ctxt->options equal to zero when loading a separate DTD (e.g. due to

> --dtdvalid option) via the xmlSAXParseDTD(). Solution: xmlSAXParseDTD()

> should set the ctxt->options to XML_PARSE_DTDLOAD - after all,

> xmlSAXParseDTD *is* loading the DTD.

>

> 3. The comment in the xmlParserHandlePEReference() is an obvious copy-paste:

> it refers to parsed entities while the code actually handles parameter

> entities. Solution: fix the comment :)

>

> Updated patch attached (against RHEL version of 2.7.6 - will update to git

> version of libxml2 if needed).

>

> Regards,

> Alexey.

 

--nextPart1926933.2guKzBsmXy-- From veillard@redhat.com Mon Jun 9 14:07:10 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id D0E4876967 for ; Mon, 9 Jun 2014 14:07:10 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.553 X-Spam-Level: X-Spam-Status: No, score=-7.553 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YX-T8c3FZ8ek for ; Mon, 9 Jun 2014 14:07:09 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by restaurant.gnome.org (Postfix) with ESMTP id DEBCD765C5 for ; Mon, 9 Jun 2014 14:06:49 +0000 (UTC) Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s59E6kiA013088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 9 Jun 2014 10:06:46 -0400 Received: from thinkpad.veillard.com (vpn1-113-155.nay.redhat.com [10.66.113.155]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s59E6hvI011741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 9 Jun 2014 10:06:45 -0400 Received: from thinkpad.veillard.com (localhost.localdomain [127.0.0.1]) by thinkpad.veillard.com (8.14.7/8.14.5) with ESMTP id s59E6TvU017555; Mon, 9 Jun 2014 22:06:36 +0800 Received: (from veillard@localhost) by thinkpad.veillard.com (8.14.7/8.14.7/Submit) id s59E628h017553; Mon, 9 Jun 2014 22:06:02 +0800 X-Authentication-Warning: thinkpad.veillard.com: veillard set sender to veillard@redhat.com using -f Date: Mon, 9 Jun 2014 22:06:02 +0800 From: Daniel Veillard To: Alexey Neyman Message-ID: <20140609140602.GB2511@redhat.com> References: <2348887.1LleT1bt8j@mistral> <7017392.2WppFRtCun@mistral> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="7iMSBzlTiPOCCT2k" Content-Disposition: inline In-Reply-To: <7017392.2WppFRtCun@mistral> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Cc: xml@gnome.org Subject: Re: [xml] [BUG] [PATCH] --postvalid broken after CVE-2014-0191 fix X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 14:07:10 -0000 --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Pong, sorry, but was distracted with other things and I accumulated feedback from different places on this issue, I would rather not have to push 3 different patches to cover this :-) I ended up with a rather similar but slightly more complex patch (attached), the DTD may have to be loaded in other different conditions wna while you apparently covered xmlIOParseDTD, one of the case I got also pointed to xmlSAXParseDTD so both need to be fixed. Also I'm doing an incremental bit fix rather than overwriting the full context option which could also cause regressions. I will also push separately an update to xmlInitParserCtxt() setting up the options based on the global variable settings (it's evil but needed for compatibility), but it's more of a cleanup than an actual fix for the issue so not in that patch, give it a try, thanks, Daniel On Sun, Jun 08, 2014 at 06:31:57PM -0700, Alexey Neyman wrote: > PING! > > On Tuesday, May 20, 2014 10:06:27 PM Alexey Neyman wrote: > > [More investigation follows. Writing from a different machine, so cannot > > reply to my own email] > > > > The issue, brief summary: upgrade of libxml2 from 2.7.6-14.el6 to > > 2.7.6-14.el6_5.1 (RHEL6) broke the --postvalid/--dtdvalid options. > > > > Minimal test case: > > > > [a.xml] > > > > > > > > > > > > > > > > > > [a.dtd] > > > > > > %base.dtd; > > > > > > [b.dtd] > > > > > > > > This command works: > > xmllint --valid --noout --dtdvalid a.dtd a.xml > > > > This command doesn't: > > xmllint --postvalid --noout --dtdvalid a.dtd a.xml > > a.xml:5: element b: validity error : No declaration for element b > > Document a.xml does not validate against a.dtd > > > > The problem: > > 1. With --postvalid (and similarly treated options --dtdvalid, > > --dtdvalidfpi) the XML_PARSE_DTDVALID is not set. Instead, > > XML_PARSE_DTDLOAD is set (the validation is performed after loading of the > > XML document). Solution: the > > xmlParserHandlePEReference() should also check for XML_PARSE_DTDLOAD or the > > parsed entities defined in the nested DTDs will not load. > > > > 2. Even with parsed entities loaded, the validation then fails: the > > xmlParserHandlePEReference() is called during the post-validation with the > > ctxt->options equal to zero when loading a separate DTD (e.g. due to > > --dtdvalid option) via the xmlSAXParseDTD(). Solution: xmlSAXParseDTD() > > should set the ctxt->options to XML_PARSE_DTDLOAD - after all, > > xmlSAXParseDTD *is* loading the DTD. > > > > 3. The comment in the xmlParserHandlePEReference() is an obvious copy-paste: > > it refers to parsed entities while the code actually handles parameter > > entities. Solution: fix the comment :) > > > > Updated patch attached (against RHEL version of 2.7.6 - will update to git > > version of libxml2 if needed). > > > > Regards, > > Alexey. > > _______________________________________________ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > https://mail.gnome.org/mailman/listinfo/xml -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="tmp.patch" diff --git a/parser.c b/parser.c index c0dea05..1415151 100644 --- a/parser.c +++ b/parser.c @@ -2608,6 +2608,9 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) && ((ctxt->options & XML_PARSE_NOENT) == 0) && ((ctxt->options & XML_PARSE_DTDVALID) == 0) && + ((ctxt->options & XML_PARSE_DTDLOAD) == 0) && + ((ctxt->options & XML_PARSE_DTDATTR) == 0) && + (ctxt->replaceEntities == 0) && (ctxt->validate == 0)) return; @@ -12616,6 +12619,9 @@ xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input, return(NULL); } + /* We are loading a DTD */ + ctxt->options |= XML_PARSE_DTDLOAD; + /* * Set-up the SAX context */ @@ -12743,6 +12749,9 @@ xmlSAXParseDTD(xmlSAXHandlerPtr sax, const xmlChar *ExternalID, return(NULL); } + /* We are loading a DTD */ + ctxt->options |= XML_PARSE_DTDLOAD; + /* * Set-up the SAX context */ --7iMSBzlTiPOCCT2k-- From veillard@redhat.com Mon Jun 9 14:12:47 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id E501776967 for ; Mon, 9 Jun 2014 14:12:47 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.553 X-Spam-Level: X-Spam-Status: No, score=-7.553 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SYyNygUyMV1U for ; Mon, 9 Jun 2014 14:12:46 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by restaurant.gnome.org (Postfix) with ESMTP id 5E92D765C5 for ; Mon, 9 Jun 2014 14:12:25 +0000 (UTC) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s59ECNGD020876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 9 Jun 2014 10:12:23 -0400 Received: from thinkpad.veillard.com (vpn1-113-155.nay.redhat.com [10.66.113.155]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s59ECJcm011779 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 9 Jun 2014 10:12:22 -0400 Received: from thinkpad.veillard.com (localhost.localdomain [127.0.0.1]) by thinkpad.veillard.com (8.14.7/8.14.5) with ESMTP id s59ECHn0019672; Mon, 9 Jun 2014 22:12:18 +0800 Received: (from veillard@localhost) by thinkpad.veillard.com (8.14.7/8.14.7/Submit) id s59ECFZR019671; Mon, 9 Jun 2014 22:12:15 +0800 X-Authentication-Warning: thinkpad.veillard.com: veillard set sender to veillard@redhat.com using -f Date: Mon, 9 Jun 2014 22:12:15 +0800 From: Daniel Veillard To: =?iso-8859-1?Q?S=E9rgio?= Batista Message-ID: <20140609141215.GC2511@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Cc: xml@gnome.org Subject: Re: [xml] [Bug][Patch] xmllint was not parsing the --c14n11 flag X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 14:12:48 -0000 Whoops, good catch :) applied and pushed, thanks ! https://git.gnome.org/browse/libxml2/commit/?id=d9ea91322502e02140d21441add0c33a0a10b042 Daniel On Wed, May 07, 2014 at 07:55:51PM +0200, Sérgio Batista wrote: > Note: The bug description below was extracted from my ticket in my fork of > libxml2 @ GitHub and is formatted using markdown. > > ---- Start of Bug description ---- > When running `$ xmllint --c14n11 [other options] [xmlfile]` it doesn't sort > the attributes as per the [Canonical XML Version 1.1]( > http://www.w3.org/TR/xml-c14n11/) from w3c. > > Specifically I note that the following specifications are not verified: > > * The XML declaration and document type declaration are removed > * Lexicographic order is imposed on the namespace declarations and > attributes of each element > > These specifications, already existent in the [previous recomendation]( > http://www.w3.org/TR/xml-c14n), hold with the call of `$ xmllint --c14n > [other options] [xmlfile]`. > > #### I/O > *Note the order of the attributes and the XML declaration and document type* > ##### Input > ```xml > > > > > > > z="" >Apples > Bananas > > > > ``` > ##### Expected Output > ```xml > > > > > > Apples > Bananas > > > > ``` > ##### Actual Output > ```xml > > > > > > > Apples > Bananas > > > > ``` > ---- End of Bug description ---- > > In attachment there's the patch that fixes this behaviour. > > Best regards, > > Sérgio Batista > > mail@se.rg.io > From 0e97c3ee2674db2fe466ed0aa191b690c9f5af70 Mon Sep 17 00:00:00 2001 > From: Sergio > Date: Wed, 7 May 2014 19:05:24 +0200 > Subject: [PATCH] xmllint was not parsing the --c14n11 flag, fixes #1 > > --- > xmllint.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xmllint.c b/xmllint.c > index 9d46ac5..b297ded 100644 > --- a/xmllint.c > +++ b/xmllint.c > @@ -2580,7 +2580,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { > fprintf(stderr, "Failed to canonicalize\n"); > progresult = XMLLINT_ERR_OUT; > } > - } else if (canonical) { > + } else if (canonical_11) { > xmlChar *result = NULL; > int size; > > -- > 1.9.1 > > _______________________________________________ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > https://mail.gnome.org/mailman/listinfo/xml -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@redhat.com Mon Jun 9 14:20:23 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 7C0BC76967 for ; Mon, 9 Jun 2014 14:20:23 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.553 X-Spam-Level: X-Spam-Status: No, score=-7.553 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VK6t4ftXmRKF for ; Mon, 9 Jun 2014 14:20:22 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by restaurant.gnome.org (Postfix) with ESMTP id 29C29765C5 for ; Mon, 9 Jun 2014 14:20:01 +0000 (UTC) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s59EJtTs024105 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 9 Jun 2014 10:19:56 -0400 Received: from thinkpad.veillard.com (vpn1-113-155.nay.redhat.com [10.66.113.155]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s59EJqmQ025382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 9 Jun 2014 10:19:54 -0400 Received: from thinkpad.veillard.com (localhost.localdomain [127.0.0.1]) by thinkpad.veillard.com (8.14.7/8.14.5) with ESMTP id s59EJoTL019729; Mon, 9 Jun 2014 22:19:51 +0800 Received: (from veillard@localhost) by thinkpad.veillard.com (8.14.7/8.14.7/Submit) id s59EJnjU019728; Mon, 9 Jun 2014 22:19:49 +0800 X-Authentication-Warning: thinkpad.veillard.com: veillard set sender to veillard@redhat.com using -f Date: Mon, 9 Jun 2014 22:19:49 +0800 From: Daniel Veillard To: Martin Ba <0xcdcdcdcd@gmx.at> Message-ID: <20140609141949.GD2511@redhat.com> References: <53468022.1060509@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53468022.1060509@gmx.at> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Cc: xml@gnome.org Subject: Re: [xml] Global error (xmlLastError) not cleaned up if xmlCleanupParser() is called on a different thread! X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 14:20:23 -0000 On Thu, Apr 10, 2014 at 01:27:30PM +0200, Martin Ba wrote: > Hi all! > > It would appear that when you have a scenario like this > > + + + + > // Thread 1: > xmlInitParser(); > // ... > // anything that sets the last error, e.g.: > xmlReadFile("file isn't there", NULL, XML_PARSE_NOBLANKS); > > // Thread 2: > xmlCleanupParser(); > + + + + > > even if (in Thread_2) you correctly call xmlCleanupParser() (once) at the > very end and don't do anything with libxml2 afterwards, the global error > will be leaked. > > (I also tried with the latest Windows binaries I could find -- 2.9.1 -- same > problem.) > > Is this a known problem? Any fix for this? > > Note the workaround for me is to call xmlResetLastError() after processing > any error received from libxml, in which case the global last error is > immediately cleaned up. > > > cheers, > Martin > > p.s.: Why would anyone do this?: > * Once scenario is when DLL's are loaded/unloaded dynamically. > * Where I actually hit this is we have a .NET/C# application that loads a > C++ module that contains a global initialization object for libxml2 that > does init and cleanup. In a managed application, destructors of global > objects are not necessarily executed on the same thread as their > constructors. Yes that's a known limitation, and why I suggest to run xmlInitParser() in the main thread. Also note of the danger of running xmlCleanupParser() on unloading, as some of the libraries you linked to (possibly indirectly) could also run libxml2. So something to do only in a very controlled context, i have had the case of extension mechanism are being used, and then those use libxml2 in turn and havoc follows. If I were redoing libxml2 now (or had been in last 10 years) there would be no global state, but with the API as-is and the need to keep ABI we are stuck with it :-\ mistake done back in 98 .... Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ From jpokorny@redhat.com Mon Jun 9 21:45:54 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id EE05F76980 for ; Mon, 9 Jun 2014 21:45:54 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.553 X-Spam-Level: X-Spam-Status: No, score=-7.553 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r25IWwg2USVk for ; Mon, 9 Jun 2014 21:45:54 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by restaurant.gnome.org (Postfix) with ESMTP id 750C8762AB for ; Mon, 9 Jun 2014 21:45:33 +0000 (UTC) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s59LjW7B028853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 9 Jun 2014 17:45:32 -0400 Received: from juicyfruit.brq.redhat.com (dhcp129-43.brq.redhat.com [10.34.129.43]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s59LjVZe008185; Mon, 9 Jun 2014 17:45:32 -0400 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= To: xml@gnome.org Date: Mon, 9 Jun 2014 23:45:24 +0200 Message-Id: <1402350324-24570-1-git-send-email-jpokorny@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Subject: [xml] [PATCH] Fix typos in relaxng.c X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 21:45:55 -0000 Signed-off-by: Jan Pokorný --- relaxng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relaxng.c b/relaxng.c index 2bbecd5..f34dc14 100644 --- a/relaxng.c +++ b/relaxng.c @@ -6600,7 +6600,7 @@ xmlRelaxNGParseGrammar(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr nodes) } /* - * Apply 4.17 mergingd rules to defines and starts + * Apply 4.17 merging rules to defines and starts */ xmlRelaxNGCombineStart(ctxt, ret); if (ret->defs != NULL) { @@ -7314,7 +7314,7 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root) } } /* - * Thisd is not an else since "include" is transformed + * This is not an else since "include" is transformed * into a div */ if (xmlStrEqual(cur->name, BAD_CAST "div")) { -- 1.9.3 From veillard@redhat.com Tue Jun 10 06:42:41 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id C0657769A7 for ; Tue, 10 Jun 2014 06:42:41 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.553 X-Spam-Level: X-Spam-Status: No, score=-7.553 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z0KcCc3_7h9R for ; Tue, 10 Jun 2014 06:42:40 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by restaurant.gnome.org (Postfix) with ESMTP id B1825768D8 for ; Tue, 10 Jun 2014 06:42:20 +0000 (UTC) Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5A6gIuA027433 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 10 Jun 2014 02:42:19 -0400 Received: from thinkpad.veillard.com (vpn1-113-155.nay.redhat.com [10.66.113.155]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5A6gEDZ029252 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Jun 2014 02:42:17 -0400 Received: from thinkpad.veillard.com (localhost.localdomain [127.0.0.1]) by thinkpad.veillard.com (8.14.7/8.14.5) with ESMTP id s5A6gD65032134; Tue, 10 Jun 2014 14:42:13 +0800 Received: (from veillard@localhost) by thinkpad.veillard.com (8.14.7/8.14.7/Submit) id s5A6gBUQ032133; Tue, 10 Jun 2014 14:42:11 +0800 X-Authentication-Warning: thinkpad.veillard.com: veillard set sender to veillard@redhat.com using -f Date: Tue, 10 Jun 2014 14:42:11 +0800 From: Daniel Veillard To: Jan =?iso-8859-1?Q?Pokorn=FD?= Message-ID: <20140610064210.GI2511@redhat.com> References: <1402350324-24570-1-git-send-email-jpokorny@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1402350324-24570-1-git-send-email-jpokorny@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Cc: xml@gnome.org Subject: Re: [xml] [PATCH] Fix typos in relaxng.c X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 06:42:41 -0000 ACK, pushed, thanks ! :-) Daniel On Mon, Jun 09, 2014 at 11:45:24PM +0200, Jan Pokorný wrote: > Signed-off-by: Jan Pokorný > --- > relaxng.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/relaxng.c b/relaxng.c > index 2bbecd5..f34dc14 100644 > --- a/relaxng.c > +++ b/relaxng.c > @@ -6600,7 +6600,7 @@ xmlRelaxNGParseGrammar(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr nodes) > } > > /* > - * Apply 4.17 mergingd rules to defines and starts > + * Apply 4.17 merging rules to defines and starts > */ > xmlRelaxNGCombineStart(ctxt, ret); > if (ret->defs != NULL) { > @@ -7314,7 +7314,7 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root) > } > } > /* > - * Thisd is not an else since "include" is transformed > + * This is not an else since "include" is transformed > * into a div > */ > if (xmlStrEqual(cur->name, BAD_CAST "div")) { > -- > 1.9.3 > > _______________________________________________ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > https://mail.gnome.org/mailman/listinfo/xml -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@redhat.com Tue Jun 10 06:48:59 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id A5D6076A4A for ; Tue, 10 Jun 2014 06:48:59 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.553 X-Spam-Level: X-Spam-Status: No, score=-7.553 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aq5J9uAu4dFm for ; Tue, 10 Jun 2014 06:48:58 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by restaurant.gnome.org (Postfix) with ESMTP id 2F5DF769A7 for ; Tue, 10 Jun 2014 06:48:37 +0000 (UTC) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5A6mUVQ020413 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Jun 2014 02:48:30 -0400 Received: from thinkpad.veillard.com (vpn1-113-155.nay.redhat.com [10.66.113.155]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5A6mOgL018907 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Jun 2014 02:48:29 -0400 Received: from thinkpad.veillard.com (localhost.localdomain [127.0.0.1]) by thinkpad.veillard.com (8.14.7/8.14.5) with ESMTP id s5A6mMKL011664; Tue, 10 Jun 2014 14:48:23 +0800 Received: (from veillard@localhost) by thinkpad.veillard.com (8.14.7/8.14.7/Submit) id s5A6mKjR011663; Tue, 10 Jun 2014 14:48:20 +0800 X-Authentication-Warning: thinkpad.veillard.com: veillard set sender to veillard@redhat.com using -f Date: Tue, 10 Jun 2014 14:48:20 +0800 From: Daniel Veillard To: Jonas Eriksson Message-ID: <20140610064820.GA32144@redhat.com> References: <1394093597-5622-1-git-send-email-jonas.eriksson@enea.com> <20140604133151.GA16771@enea.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140604133151.GA16771@enea.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Cc: xml@gnome.org Subject: Re: [xml] [PATCH] configure: Add --with-python-install-dir X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 06:48:59 -0000 Fair :-) Yes that looks self contained and should be safe, pushed on master, thanks ! Daniel On Wed, Jun 04, 2014 at 03:31:56PM +0200, Jonas Eriksson wrote: > Hi, > > Top-posting a little 'ping' for this patch. > > /Jonas > > On Thu, Mar 06, 2014 at 09:13:17 +0100 Jonas Eriksson wrote: > > Cross-compiling the python bindings is a bit difficult today, as the > > configure script will figure out the site packages dir > > (PYTHON_SITE_PACKAGES) by either: > > > > - Generating the path to the site-package target directories using > > libdir, and see if it exists. As it is not possible to point to the > > full path of the sysroot, since that will yield the wrong install > > path, and that the directory does not neccessarily exist on the host, > > this approach will not work. > > > > - Fetch the site packages dir from the python interpreter as pointed to > > by --with-python. Since this python interpreter will point to the > > sysroot, the install dir generated will be inside the sysroot and thus > > not work. > > > > This patch approaches the problem by adding the possibility of > > explicitly stating the install dir of the python packages, leaving it up > > to the cross-compilation environment to specify it. The patch does not > > affect the default case (non-cross compilation). > > > > Signed-off-by: Jonas Eriksson > > --- > > configure.in | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/configure.in b/configure.in > > index ecaa403..21ad1e7 100644 > > --- a/configure.in > > +++ b/configure.in > > @@ -148,6 +148,9 @@ AC_ARG_WITH(push, > > [ --with-push add the PUSH parser interfaces (on)]) > > AC_ARG_WITH(python, > > [ --with-python[[=DIR]] build Python bindings if found]) > > +AC_ARG_WITH(python_install_dir, > > +[ --with-python-install-dir=DIR > > + install Python bindings in DIR]) > > AC_ARG_WITH(reader, > > [ --with-reader add the xmlReader parsing interface (on)]) > > AC_ARG_WITH(readline, > > @@ -866,6 +869,10 @@ if test "$with_python" != "no" ; then > > fi > > fi > > fi > > + if test "$with_python_install_dir" != "" > > + then > > + PYTHON_SITE_PACKAGES="$with_python_install_dir" > > + fi > > if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = "" > > then > > if test -d $libdir/python$PYTHON_VERSION/site-packages > > -- > > 1.9.0 > _______________________________________________ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > https://mail.gnome.org/mailman/listinfo/xml -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ From 0xcdcdcdcd@gmx.at Tue Jun 10 07:50:42 2014 Return-Path: <0xcdcdcdcd@gmx.at> X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 49F46769B2 for ; Tue, 10 Jun 2014 07:50:42 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.399 X-Spam-Level: X-Spam-Status: No, score=-0.399 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, FROM_LOCAL_NOVOWEL=0.5, HK_RANDOM_ENVFROM=0.001, HK_RANDOM_FROM=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id omJQiSPpq5Ix for ; Tue, 10 Jun 2014 07:50:40 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by restaurant.gnome.org (Postfix) with ESMTP id 0170C768D8 for ; Tue, 10 Jun 2014 07:50:19 +0000 (UTC) Received: from [127.0.0.1] ([81.189.124.202]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0LrIPo-1WmSld23zg-0137Eh; Tue, 10 Jun 2014 09:50:13 +0200 Message-ID: <5396B8B5.8090501@gmx.at> Date: Tue, 10 Jun 2014 09:50:13 +0200 From: Martin Ba <0xcdcdcdcd@gmx.at> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: veillard@redhat.com References: <53468022.1060509@gmx.at> <20140609141949.GD2511@redhat.com> In-Reply-To: <20140609141949.GD2511@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:0GCZX9p0uRihRbLZZVlLbhuMR2SkbnrgnaqFpzbaa4OSAMWMDh4 RoHzzeUEFoyT/X55Zq6A6lS6KblcbFaxGGRSImnTOVm1wLQCk8JumWEoI6JQdsyKPjIADi3 5xSjsn3hcLASv94z1fbU881XBCxCDevzSTxdGXzbBq8XQUeK0Iymb2WqGF3/6d5zmR98mBv 1+6tCeljWjZQay/gFHt3Q== Cc: xml@gnome.org Subject: Re: [xml] Global error (xmlLastError) not cleaned up if xmlCleanupParser() is called on a different thread! X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 07:50:42 -0000 On 09.06.2014 16:19, Daniel Veillard wrote: > On Thu, Apr 10, 2014 at 01:27:30PM +0200, Martin Ba wrote: >> Hi all! >> >> It would appear that when you have a scenario like this >> >> + + + + >> // Thread 1: >> xmlInitParser(); >> // ... >> // anything that sets the last error, e.g.: >> xmlReadFile("file isn't there", NULL, XML_PARSE_NOBLANKS); >> >> // Thread 2: >> xmlCleanupParser(); >> + + + + >> >> even if (in Thread_2) you correctly call xmlCleanupParser() (once) at the >> very end and don't do anything with libxml2 afterwards, the global error >> will be leaked. >> >> (I also tried with the latest Windows binaries I could find -- 2.9.1 -- same >> problem.) >> >> Is this a known problem? Any fix for this? >> >> Note the workaround for me is to call xmlResetLastError() after processing >> any error received from libxml, in which case the global last error is >> immediately cleaned up. >> >> >> cheers, >> Martin >> >> p.s.: Why would anyone do this?: >> * Once scenario is when DLL's are loaded/unloaded dynamically. >> * Where I actually hit this is we have a .NET/C# application that loads a >> C++ module that contains a global initialization object for libxml2 that >> does init and cleanup. In a managed application, destructors of global >> objects are not necessarily executed on the same thread as their >> constructors. > > Yes that's a known limitation, and why I suggest to run > xmlInitParser() in the main thread. Also note of the danger of running > xmlCleanupParser() on unloading, as some of the libraries you linked to > (possibly indirectly) could also run libxml2. So something to do only > in a very controlled context, i have had the case of extension mechanism > are being used, and then those use libxml2 in turn and havoc follows. > If I were redoing libxml2 now (or had been in last 10 years) there > would be no global state, but with the API as-is and the need to keep > ABI we are stuck with it :-\ mistake done back in 98 .... > Thanks for this info. At least I now know that there isn't much I can do with the current version. I would like to note a few points: * In this case, running xmlInitParser() on the main thread doesn't help -- in fact it *is* run on the main thread -- the problem is that unloading potentially happens on a different thread when loaded into a .NET process. * Yes, the global Init/Cleanup is a problem, I understand. * I would like to observe that -- for those Windows applications I maintain and know -- ABI compatibility is a non-issue, as the libxml2.dll is part of the app distribution anyway. * For this specific case (error cleanup), I strongly believe that the problem could be corrected without affecting either the API or ABI, but I don't have time to investigate more since the workaround `xmlResetLastError` does work OK for me, as I only make libxml2 calls from C++ wrappers anyway. Thanks, Martin From veillard@redhat.com Tue Jun 10 08:09:19 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id DC7BE769C3 for ; Tue, 10 Jun 2014 08:09:19 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.553 X-Spam-Level: X-Spam-Status: No, score=-7.553 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O8dl48EwKBmu for ; Tue, 10 Jun 2014 08:09:19 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by restaurant.gnome.org (Postfix) with ESMTP id 2DDC1768D8 for ; Tue, 10 Jun 2014 08:08:58 +0000 (UTC) Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5A88twb028973 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 10 Jun 2014 04:08:55 -0400 Received: from thinkpad.veillard.com (vpn1-113-155.nay.redhat.com [10.66.113.155]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s5A88pDI027937 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Jun 2014 04:08:54 -0400 Received: from thinkpad.veillard.com (localhost.localdomain [127.0.0.1]) by thinkpad.veillard.com (8.14.7/8.14.5) with ESMTP id s5A88nTf018604; Tue, 10 Jun 2014 16:08:50 +0800 Received: (from veillard@localhost) by thinkpad.veillard.com (8.14.7/8.14.7/Submit) id s5A88l7c018602; Tue, 10 Jun 2014 16:08:47 +0800 X-Authentication-Warning: thinkpad.veillard.com: veillard set sender to veillard@redhat.com using -f Date: Tue, 10 Jun 2014 16:08:47 +0800 From: Daniel Veillard To: Stefan Behnel Message-ID: <20140610080847.GB32144@redhat.com> References: <53078AE0.6010907@behnel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53078AE0.6010907@behnel.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Cc: xml Subject: Re: [xml] [BUG+FIX] valid.c erroneously ignores a validation error if no error callback set X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 08:09:19 -0000 Ah, right ! Fixed upstream and bug updated, thanks ! Daniel On Fri, Feb 21, 2014 at 06:20:32PM +0100, Stefan Behnel wrote: > Hi, > > valid.c contains this code: > > 2636 if ((ctxt != NULL) && (ctxt->error != NULL)) { > 2637 xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED, > 2638 "ID %s already defined\n", > 2639 value, NULL, NULL); > 2640 } > > It prevents the error from being reported if ctxt->error is not set, > although simply calling xmlErrValifNode() would properly report the error > to the global error callback if the NULL checks above didn't exist. > > The fix is to remove the surrounding "if" test. > > https://bugzilla.gnome.org/show_bug.cgi?id=724903 > > Stefan > _______________________________________________ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > https://mail.gnome.org/mailman/listinfo/xml -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@redhat.com Tue Jun 10 08:14:54 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 722F1768D8 for ; Tue, 10 Jun 2014 08:14:54 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.553 X-Spam-Level: X-Spam-Status: No, score=-7.553 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id difBQoVNTFuK for ; Tue, 10 Jun 2014 08:14:53 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by restaurant.gnome.org (Postfix) with ESMTP id 5604D76493 for ; Tue, 10 Jun 2014 08:14:32 +0000 (UTC) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5A8ERhh016984 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Jun 2014 04:14:27 -0400 Received: from thinkpad.veillard.com (vpn1-113-155.nay.redhat.com [10.66.113.155]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5A8ENj5013399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Jun 2014 04:14:26 -0400 Received: from thinkpad.veillard.com (localhost.localdomain [127.0.0.1]) by thinkpad.veillard.com (8.14.7/8.14.5) with ESMTP id s5A8ELVC018674; Tue, 10 Jun 2014 16:14:21 +0800 Received: (from veillard@localhost) by thinkpad.veillard.com (8.14.7/8.14.7/Submit) id s5A8EK8c018673; Tue, 10 Jun 2014 16:14:20 +0800 X-Authentication-Warning: thinkpad.veillard.com: veillard set sender to veillard@redhat.com using -f Date: Tue, 10 Jun 2014 16:14:20 +0800 From: Daniel Veillard To: Martin Ba <0xcdcdcdcd@gmx.at> Message-ID: <20140610081420.GC32144@redhat.com> References: <53468022.1060509@gmx.at> <20140609141949.GD2511@redhat.com> <5396B8B5.8090501@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5396B8B5.8090501@gmx.at> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Cc: xml@gnome.org Subject: Re: [xml] Global error (xmlLastError) not cleaned up if xmlCleanupParser() is called on a different thread! X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 08:14:54 -0000 On Tue, Jun 10, 2014 at 09:50:13AM +0200, Martin Ba wrote: > On 09.06.2014 16:19, Daniel Veillard wrote: > >On Thu, Apr 10, 2014 at 01:27:30PM +0200, Martin Ba wrote: > >>Hi all! > >> > >>It would appear that when you have a scenario like this > >> > >>+ + + + > >>// Thread 1: > >>xmlInitParser(); > >>// ... > >>// anything that sets the last error, e.g.: > >>xmlReadFile("file isn't there", NULL, XML_PARSE_NOBLANKS); > >> > >>// Thread 2: > >>xmlCleanupParser(); > >>+ + + + > >> > >>even if (in Thread_2) you correctly call xmlCleanupParser() (once) at the > >>very end and don't do anything with libxml2 afterwards, the global error > >>will be leaked. > >> > >>(I also tried with the latest Windows binaries I could find -- 2.9.1 -- same > >>problem.) > >> > >>Is this a known problem? Any fix for this? > >> > >>Note the workaround for me is to call xmlResetLastError() after processing > >>any error received from libxml, in which case the global last error is > >>immediately cleaned up. > >> > >> > >>cheers, > >>Martin > >> > >>p.s.: Why would anyone do this?: > >>* Once scenario is when DLL's are loaded/unloaded dynamically. > >>* Where I actually hit this is we have a .NET/C# application that loads a > >>C++ module that contains a global initialization object for libxml2 that > >>does init and cleanup. In a managed application, destructors of global > >>objects are not necessarily executed on the same thread as their > >>constructors. > > > > Yes that's a known limitation, and why I suggest to run > >xmlInitParser() in the main thread. Also note of the danger of running > >xmlCleanupParser() on unloading, as some of the libraries you linked to > >(possibly indirectly) could also run libxml2. So something to do only > >in a very controlled context, i have had the case of extension mechanism > >are being used, and then those use libxml2 in turn and havoc follows. > > If I were redoing libxml2 now (or had been in last 10 years) there > >would be no global state, but with the API as-is and the need to keep > >ABI we are stuck with it :-\ mistake done back in 98 .... > > > > > Thanks for this info. At least I now know that there isn't much I can do > with the current version. > > I would like to note a few points: > > * In this case, running xmlInitParser() on the main thread doesn't help -- > in fact it *is* run on the main thread -- the problem is that unloading > potentially happens on a different thread when loaded into a .NET process. > * Yes, the global Init/Cleanup is a problem, I understand. > * I would like to observe that -- for those Windows applications I maintain > and know -- ABI compatibility is a non-issue, as the libxml2.dll is part of > the app distribution anyway. > * For this specific case (error cleanup), I strongly believe that the > problem could be corrected without affecting either the API or ABI, but I > don't have time to investigate more since the workaround `xmlResetLastError` > does work OK for me, as I only make libxml2 calls from C++ wrappers anyway. Windows may have special ways to reclaim the memory, the problem is that there is no safe way to do the cleanup in general. It's thread local storage too, and then behaviour is OS dependent (possibly compiler dependant). I take patches but it's a very difficult area.... daniel -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ From alex@alex.org.uk Tue Jun 10 08:39:22 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 86E3776A55 for ; Tue, 10 Jun 2014 08:39:22 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.201 X-Spam-Level: X-Spam-Status: No, score=-4.201 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7V_AsolzKHmp for ; Tue, 10 Jun 2014 08:39:21 +0000 (UTC) Received: from mail.avalus.com (mail.avalus.com [89.16.176.221]) by restaurant.gnome.org (Postfix) with ESMTP id A006976493 for ; Tue, 10 Jun 2014 08:39:01 +0000 (UTC) Received: by mail.avalus.com (Postfix) with ESMTPSA id EA68DC561CF; Tue, 10 Jun 2014 09:38:48 +0100 (BST) Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Alex Bligh In-Reply-To: <20140610081420.GC32144@redhat.com> Date: Tue, 10 Jun 2014 09:38:48 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <175D0857-F5B5-4870-AB72-B542E5423918@alex.org.uk> References: <53468022.1060509@gmx.at> <20140609141949.GD2511@redhat.com> <5396B8B5.8090501@gmx.at> <20140610081420.GC32144@redhat.com> To: veillard@redhat.com X-Mailer: Apple Mail (2.1085) Cc: xml@gnome.org Subject: Re: [xml] Global error (xmlLastError) not cleaned up if xmlCleanupParser() is called on a different thread! X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 08:39:22 -0000 On 10 Jun 2014, at 09:14, Daniel Veillard wrote: >> * For this specific case (error cleanup), I strongly believe that the >> problem could be corrected without affecting either the API or ABI, = but I >> don't have time to investigate more since the workaround = `xmlResetLastError` >> does work OK for me, as I only make libxml2 calls from C++ wrappers = anyway. >=20 > Windows may have special ways to reclaim the memory, the problem is = that > there is no safe way to do the cleanup in general. It's thread local > storage too, and then behaviour is OS dependent (possibly compiler > dependant). I take patches but it's a very difficult area.... FWIW last time this all came up (possibly my fault) I was going to send you a patch, What that would have done was: a) provide 2 new calls: xmlContextPtr xmlNewContext() xmlFreerContext(xmlContextPtr ctx) b) make these two increment a static variable, and if the variable was zero on entry, do what xmlInitParser does; and decrement a static variable, and if it reaches zero, do xmlCleanupParser. Make them return and free an opaque xmlContext struct that currently holds nothing. c) mark xmlInitParser and xmlCleanupParser as deprecated This at least allows for multiple inits and frees between libraries, but does not (yet) solve the problem of global variables. Eventually we'd then make an xmlContext contain an xmlGlobalState and add variants of each API call that allowed for an xmlContext to be passed as the first argument; this could be relatively easily done with some nasty perl on the source code. --=20 Alex Bligh From veillard@redhat.com Tue Jun 10 09:00:39 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 47B9C76A1E for ; Tue, 10 Jun 2014 09:00:39 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.553 X-Spam-Level: X-Spam-Status: No, score=-7.553 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aegynpjM5Rwz for ; Tue, 10 Jun 2014 09:00:35 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by restaurant.gnome.org (Postfix) with ESMTP id 4C5CB76493 for ; Tue, 10 Jun 2014 09:00:14 +0000 (UTC) Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5A903pj003586 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Jun 2014 05:00:03 -0400 Received: from thinkpad.veillard.com (vpn1-113-155.nay.redhat.com [10.66.113.155]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5A8xwcG025757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Jun 2014 05:00:01 -0400 Received: from thinkpad.veillard.com (localhost.localdomain [127.0.0.1]) by thinkpad.veillard.com (8.14.7/8.14.5) with ESMTP id s5A8xu5R019037; Tue, 10 Jun 2014 16:59:57 +0800 Received: (from veillard@localhost) by thinkpad.veillard.com (8.14.7/8.14.7/Submit) id s5A8xsRi019036; Tue, 10 Jun 2014 16:59:54 +0800 X-Authentication-Warning: thinkpad.veillard.com: veillard set sender to veillard@redhat.com using -f Date: Tue, 10 Jun 2014 16:59:54 +0800 From: Daniel Veillard To: Alex Bligh Message-ID: <20140610085954.GE32144@redhat.com> References: <53468022.1060509@gmx.at> <20140609141949.GD2511@redhat.com> <5396B8B5.8090501@gmx.at> <20140610081420.GC32144@redhat.com> <175D0857-F5B5-4870-AB72-B542E5423918@alex.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <175D0857-F5B5-4870-AB72-B542E5423918@alex.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Cc: xml@gnome.org Subject: Re: [xml] Global error (xmlLastError) not cleaned up if xmlCleanupParser() is called on a different thread! X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 09:00:39 -0000 On Tue, Jun 10, 2014 at 09:38:48AM +0100, Alex Bligh wrote: > > On 10 Jun 2014, at 09:14, Daniel Veillard wrote: > > >> * For this specific case (error cleanup), I strongly believe that the > >> problem could be corrected without affecting either the API or ABI, but I > >> don't have time to investigate more since the workaround `xmlResetLastError` > >> does work OK for me, as I only make libxml2 calls from C++ wrappers anyway. > > > > Windows may have special ways to reclaim the memory, the problem is that > > there is no safe way to do the cleanup in general. It's thread local > > storage too, and then behaviour is OS dependent (possibly compiler > > dependant). I take patches but it's a very difficult area.... > > FWIW last time this all came up (possibly my fault) I was going to send > you a patch, > > What that would have done was: > > a) provide 2 new calls: > xmlContextPtr xmlNewContext() > xmlFreerContext(xmlContextPtr ctx) > > b) make these two increment a static variable, and if the variable was > zero on entry, do what xmlInitParser does; and decrement a static > variable, and if it reaches zero, do xmlCleanupParser. Make them return > and free an opaque xmlContext struct that currently holds nothing. what happen is a sublibrary or a plugin uses libxml2 ? Then you crash the problem is that this assume a very controlled context and unfortunately that's not the case libxml2 is reused by a number of libraries. > c) mark xmlInitParser and xmlCleanupParser as deprecated > > This at least allows for multiple inits and frees between libraries, > but does not (yet) solve the problem of global variables. Eventually > we'd then make an xmlContext contain an xmlGlobalState and add > variants of each API call that allowed for an xmlContext to be > passed as the first argument; this could be relatively easily > done with some nasty perl on the source code. This would work if everybody started writing fresh code around libxml2, but that does not reflect reality unfortunately. Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ From alex@alex.org.uk Tue Jun 10 09:18:33 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 2B913768D3 for ; Tue, 10 Jun 2014 09:18:33 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.201 X-Spam-Level: X-Spam-Status: No, score=-4.201 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1Nv6EYSvfuGz for ; Tue, 10 Jun 2014 09:18:32 +0000 (UTC) Received: from mail.avalus.com (mail.avalus.com [89.16.176.221]) by restaurant.gnome.org (Postfix) with ESMTP id E52EE76493 for ; Tue, 10 Jun 2014 09:18:11 +0000 (UTC) Received: by mail.avalus.com (Postfix) with ESMTPSA id 2B2CCC561CD; Tue, 10 Jun 2014 10:17:59 +0100 (BST) Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Alex Bligh In-Reply-To: <20140610085954.GE32144@redhat.com> Date: Tue, 10 Jun 2014 10:17:58 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <53468022.1060509@gmx.at> <20140609141949.GD2511@redhat.com> <5396B8B5.8090501@gmx.at> <20140610081420.GC32144@redhat.com> <175D0857-F5B5-4870-AB72-B542E5423918@alex.org.uk> <20140610085954.GE32144@redhat.com> To: veillard@redhat.com X-Mailer: Apple Mail (2.1085) Cc: xml@gnome.org Subject: Re: [xml] Global error (xmlLastError) not cleaned up if xmlCleanupParser() is called on a different thread! X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 09:18:33 -0000 Daniel, >> FWIW last time this all came up (possibly my fault) I was going to send >> you a patch, >> >> What that would have done was: >> >> a) provide 2 new calls: >> xmlContextPtr xmlNewContext() >> xmlFreerContext(xmlContextPtr ctx) >> >> b) make these two increment a static variable, and if the variable was >> zero on entry, do what xmlInitParser does; and decrement a static >> variable, and if it reaches zero, do xmlCleanupParser. Make them return >> and free an opaque xmlContext struct that currently holds nothing. > > what happen is a sublibrary or a plugin uses libxml2 ? Then you crash > the problem is that this assume a very controlled context and > unfortunately that's not the case libxml2 is reused by a number of > libraries. This is the problem it was designed to address. Let's say application A and libraries B and C both use libxml2. None has any awareness the other is using it. The current issue is that B and C cannot safely call xmlCleanupParser, and A can only safely call it if it knows it's effectively never going to make any further library calls (as strictly speaking any library could use libxml2). To make things worse, it is legitimate to call xmlInitParser more than once. Now what happens is A, B and C switch gradually to using the new calls (which are relatively simple changes). If either A, B or C have used xmlInitParser, then the 'new' call to xmlFreeContext does not in fact do the cleanup - i.e. just the counter of 'new' callers is decremented. We know libraries don't (well, should not and are broken if they do) call xmlCleanupParser, so the only thing that can legitimately call it is the application (A). So if B and C are converted to use the new calls, all clear up will happen properly and predictably whether A is converted or not. Moreover, if B and C are converted but application D (which uses B and C) does NOT use libxml2, D will no longer leak memory. This is a substantial improvement, as we'll no longer see valgrind memory leaks in the case of D, and cleaning up after oneself will be easier. >> c) mark xmlInitParser and xmlCleanupParser as deprecated That bit can be done at the same time. >> This at least allows for multiple inits and frees between libraries, >> but does not (yet) solve the problem of global variables. Eventually >> we'd then make an xmlContext contain an xmlGlobalState and add >> variants of each API call that allowed for an xmlContext to be >> passed as the first argument; this could be relatively easily >> done with some nasty perl on the source code. > > This would work if everybody started writing fresh code around > libxml2, but that does not reflect reality unfortunately. To be clear what I am suggesting is continuing to support the existing API (mapped through macros to a global context), so existing users continue to work and the ABI is unchanged. As the old API would be generated by macros, there would (in theory) be minimum extra maintenance. I'm suggesting the underlying calls take a pointer to a global state object, so that new applications can be written that don't assume global state. Most importantly, libraries can be written that can work without assumptions as to whether the calling application has set (e.g.) the tree indent thing. Clearly people aren't going to change the API they use immediately (hence the need to support the old API) and we'd arrange that simply by passing a NULL as the first argument (or similar), it used the global state, which would mean converting an application would be simply a matter of perl search and replace to start off with. -- Alex Bligh From stilor@att.net Tue Jun 10 21:18:47 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 86A2E768C6 for ; Tue, 10 Jun 2014 21:18:47 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.806 X-Spam-Level: X-Spam-Status: No, score=-1.806 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RDNS_NONE=0.793] autolearn=no Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eA3_2FcfG7v1 for ; Tue, 10 Jun 2014 21:18:46 +0000 (UTC) Received: from stitch.lnxw.com (unknown [207.21.185.2]) by restaurant.gnome.org (Postfix) with ESMTP id 66172765C5 for ; Tue, 10 Jun 2014 21:18:24 +0000 (UTC) Received: from boba.localnet (boba.Lynx.COM [172.17.131.122]) by stitch.lnxw.com (8.13.8/8.13.8) with ESMTP id s5ALIM4M024451; Tue, 10 Jun 2014 14:18:22 -0700 From: Alexey Neyman To: veillard@redhat.com Date: Tue, 10 Jun 2014 14:18:19 -0700 User-Agent: KMail/1.13.5 (Linux/2.6.34-020634-generic; KDE/4.4.5; i686; ; ) References: <2348887.1LleT1bt8j@mistral> <7017392.2WppFRtCun@mistral> <20140609140602.GB2511@redhat.com> In-Reply-To: <20140609140602.GB2511@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201406101418.20579.stilor@att.net> Cc: xml@gnome.org Subject: Re: [xml] [BUG] [PATCH] --postvalid broken after CVE-2014-0191 fix X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 21:18:47 -0000 Hi Daniel, Your patch works for me, thanks! One more thing you missed though: s/parsed/parameter/ in the copy-pasted comment :) Regards, Alexey. On Monday, June 09, 2014 07:06:02 am Daniel Veillard wrote: > Pong, sorry, but was distracted with other things and I accumulated > feedback from different places on this issue, I would rather not have to > push 3 different patches to cover this :-) > > I ended up with a rather similar but slightly more complex patch > (attached), the DTD may have to be loaded in other different conditions > wna while you apparently covered xmlIOParseDTD, one of the case I got > also pointed to xmlSAXParseDTD so both need to be fixed. Also I'm > doing an incremental bit fix rather than overwriting the full context > option which could also cause regressions. > > I will also push separately an update to xmlInitParserCtxt() setting > up the options based on the global variable settings (it's evil but > needed for compatibility), but it's more of a cleanup than an actual > fix for the issue so not in that patch, > > give it a try, > > thanks, > > Daniel > > On Sun, Jun 08, 2014 at 06:31:57PM -0700, Alexey Neyman wrote: > > PING! > > > > On Tuesday, May 20, 2014 10:06:27 PM Alexey Neyman wrote: > > > [More investigation follows. Writing from a different machine, so > > > cannot reply to my own email] > > > > > > The issue, brief summary: upgrade of libxml2 from 2.7.6-14.el6 to > > > 2.7.6-14.el6_5.1 (RHEL6) broke the --postvalid/--dtdvalid options. > > > > > > Minimal test case: > > > > > > [a.xml] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [a.dtd] > > > > > > > > > %base.dtd; > > > > > > > > > [b.dtd] > > > > > > > > > > > > This command works: > > > xmllint --valid --noout --dtdvalid a.dtd a.xml > > > > > > This command doesn't: > > > xmllint --postvalid --noout --dtdvalid a.dtd a.xml > > > a.xml:5: element b: validity error : No declaration for element b > > > Document a.xml does not validate against a.dtd > > > > > > The problem: > > > 1. With --postvalid (and similarly treated options --dtdvalid, > > > --dtdvalidfpi) the XML_PARSE_DTDVALID is not set. Instead, > > > XML_PARSE_DTDLOAD is set (the validation is performed after loading of > > > the XML document). Solution: the > > > xmlParserHandlePEReference() should also check for XML_PARSE_DTDLOAD or > > > the parsed entities defined in the nested DTDs will not load. > > > > > > 2. Even with parsed entities loaded, the validation then fails: the > > > xmlParserHandlePEReference() is called during the post-validation with > > > the ctxt->options equal to zero when loading a separate DTD (e.g. due > > > to --dtdvalid option) via the xmlSAXParseDTD(). Solution: > > > xmlSAXParseDTD() should set the ctxt->options to XML_PARSE_DTDLOAD - > > > after all, xmlSAXParseDTD *is* loading the DTD. > > > > > > 3. The comment in the xmlParserHandlePEReference() is an obvious > > > copy-paste: it refers to parsed entities while the code actually > > > handles parameter entities. Solution: fix the comment :) > > > > > > Updated patch attached (against RHEL version of 2.7.6 - will update to > > > git version of libxml2 if needed). > > > > > > Regards, > > > Alexey. > > > > _______________________________________________ > > xml mailing list, project page http://xmlsoft.org/ > > xml@gnome.org > > https://mail.gnome.org/mailman/listinfo/xml From veillard@redhat.com Wed Jun 11 10:24:02 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id F25BD7694A for ; Wed, 11 Jun 2014 10:24:01 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.553 X-Spam-Level: X-Spam-Status: No, score=-7.553 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XQJivCmrsk4t for ; Wed, 11 Jun 2014 10:24:01 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by restaurant.gnome.org (Postfix) with ESMTP id 04152762EC for ; Wed, 11 Jun 2014 10:23:40 +0000 (UTC) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5BANcDB010598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Jun 2014 06:23:38 -0400 Received: from thinkpad.veillard.com (vpn1-113-155.nay.redhat.com [10.66.113.155]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5BANZZu014741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 11 Jun 2014 06:23:37 -0400 Received: from thinkpad.veillard.com (localhost.localdomain [127.0.0.1]) by thinkpad.veillard.com (8.14.7/8.14.5) with ESMTP id s5BANX8L004369; Wed, 11 Jun 2014 18:23:34 +0800 Received: (from veillard@localhost) by thinkpad.veillard.com (8.14.7/8.14.7/Submit) id s5BANVYB004364; Wed, 11 Jun 2014 18:23:31 +0800 X-Authentication-Warning: thinkpad.veillard.com: veillard set sender to veillard@redhat.com using -f Date: Wed, 11 Jun 2014 18:23:31 +0800 From: Daniel Veillard To: Alexey Neyman Message-ID: <20140611102331.GB30698@redhat.com> References: <2348887.1LleT1bt8j@mistral> <7017392.2WppFRtCun@mistral> <20140609140602.GB2511@redhat.com> <201406101418.20579.stilor@att.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201406101418.20579.stilor@att.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Cc: xml@gnome.org Subject: Re: [xml] [BUG] [PATCH] --postvalid broken after CVE-2014-0191 fix X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2014 10:24:02 -0000 thanks ! Yes, I have now pushed it in master, this should solve all the issues which got reported for that CVE-2014-0191 patch https://git.gnome.org/browse/libxml2/commit/?id=dd8367da17c2948981a51e52c8a6beb445edf825 feedback welcome ! Daniel On Tue, Jun 10, 2014 at 02:18:19PM -0700, Alexey Neyman wrote: > Hi Daniel, > > Your patch works for me, thanks! One more thing you missed though: > s/parsed/parameter/ in the copy-pasted comment :) > > Regards, > Alexey. > > On Monday, June 09, 2014 07:06:02 am Daniel Veillard wrote: > > Pong, sorry, but was distracted with other things and I accumulated > > feedback from different places on this issue, I would rather not have to > > push 3 different patches to cover this :-) > > > > I ended up with a rather similar but slightly more complex patch > > (attached), the DTD may have to be loaded in other different conditions > > wna while you apparently covered xmlIOParseDTD, one of the case I got > > also pointed to xmlSAXParseDTD so both need to be fixed. Also I'm > > doing an incremental bit fix rather than overwriting the full context > > option which could also cause regressions. > > > > I will also push separately an update to xmlInitParserCtxt() setting > > up the options based on the global variable settings (it's evil but > > needed for compatibility), but it's more of a cleanup than an actual > > fix for the issue so not in that patch, > > > > give it a try, > > > > thanks, > > > > Daniel > > > > On Sun, Jun 08, 2014 at 06:31:57PM -0700, Alexey Neyman wrote: > > > PING! > > > > > > On Tuesday, May 20, 2014 10:06:27 PM Alexey Neyman wrote: > > > > [More investigation follows. Writing from a different machine, so > > > > cannot reply to my own email] > > > > > > > > The issue, brief summary: upgrade of libxml2 from 2.7.6-14.el6 to > > > > 2.7.6-14.el6_5.1 (RHEL6) broke the --postvalid/--dtdvalid options. > > > > > > > > Minimal test case: > > > > > > > > [a.xml] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [a.dtd] > > > > > > > > > > > > %base.dtd; > > > > > > > > > > > > [b.dtd] > > > > > > > > > > > > > > > > This command works: > > > > xmllint --valid --noout --dtdvalid a.dtd a.xml > > > > > > > > This command doesn't: > > > > xmllint --postvalid --noout --dtdvalid a.dtd a.xml > > > > a.xml:5: element b: validity error : No declaration for element b > > > > Document a.xml does not validate against a.dtd > > > > > > > > The problem: > > > > 1. With --postvalid (and similarly treated options --dtdvalid, > > > > --dtdvalidfpi) the XML_PARSE_DTDVALID is not set. Instead, > > > > XML_PARSE_DTDLOAD is set (the validation is performed after loading of > > > > the XML document). Solution: the > > > > xmlParserHandlePEReference() should also check for XML_PARSE_DTDLOAD or > > > > the parsed entities defined in the nested DTDs will not load. > > > > > > > > 2. Even with parsed entities loaded, the validation then fails: the > > > > xmlParserHandlePEReference() is called during the post-validation with > > > > the ctxt->options equal to zero when loading a separate DTD (e.g. due > > > > to --dtdvalid option) via the xmlSAXParseDTD(). Solution: > > > > xmlSAXParseDTD() should set the ctxt->options to XML_PARSE_DTDLOAD - > > > > after all, xmlSAXParseDTD *is* loading the DTD. > > > > > > > > 3. The comment in the xmlParserHandlePEReference() is an obvious > > > > copy-paste: it refers to parsed entities while the code actually > > > > handles parameter entities. Solution: fix the comment :) > > > > > > > > Updated patch attached (against RHEL version of 2.7.6 - will update to > > > > git version of libxml2 if needed). > > > > > > > > Regards, > > > > Alexey. > > > > > > _______________________________________________ > > > xml mailing list, project page http://xmlsoft.org/ > > > xml@gnome.org > > > https://mail.gnome.org/mailman/listinfo/xml -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ From froh@suse.com Fri Jun 13 09:29:34 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 4E013762C5 for ; Fri, 13 Jun 2014 09:29:34 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.201 X-Spam-Level: X-Spam-Status: No, score=-4.201 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XqplUxaUVttv for ; Fri, 13 Jun 2014 09:29:33 +0000 (UTC) Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) by restaurant.gnome.org (Postfix) with ESMTP id DAFCF762A9 for ; Fri, 13 Jun 2014 09:29:12 +0000 (UTC) Received: from linux-5war.site (charybdis-ext.suse.de [195.135.221.2]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Fri, 13 Jun 2014 11:29:10 +0200 From: Susanne Oberhauser-Hirschoff To: xml@gnome.org References: <2020885.K9zImYpgA3@mistral> <2532936.QWZFynuRAT@mistral> <20140422135809.GE20304@redhat.com> Date: Fri, 13 Jun 2014 11:30:17 +0200 In-Reply-To: (Susanne Oberhauser-Hirschoff's message of "Wed, 23 Apr 2014 14:21:27 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [xml] xml:base missing on result from XInclude? X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 09:29:34 -0000 Hi, Susanne Oberhauser-Hirschoff writes: > Daniel, in 2003 you wrote this: > https://www.sourceware.org/ml/docbook/2003-03/msg00101.html > >> I tried to minimize the addition of xml:base when it could be avoided >> in practice (i.e. if the absence of the xml:base would not generate >> erroneous URI-References to URI computations). This was a deployment >> trade-off that I will fix when XInclude and xml:base will get better >> acceptance. >>=20 >> Daniel I've provided a patch that makes it an option, and a patch that just does it as per the test suite. Either option is ok for me. I'd appreciate one of them to be considered upstream, so I don't have to maintain an extra patchset. The use case is valid debugging information 'which file does this fragment originate from' using lxml or any other tool based on libxml2. thx, S. --=20 Susanne Oberhauser SUSE LINUX Products GmbH +49-911-74053-574 Maxfeldstra=C3=9Fe 5 Processes and Infrastructure 90409 N=C3=BCrnberg GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer, HRB 16746 (AG N=C3= =BCrnberg) From cphealy@gmail.com Fri Jun 13 15:05:00 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id B13CE76995 for ; Fri, 13 Jun 2014 15:05:00 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.699 X-Spam-Level: X-Spam-Status: No, score=-2.699 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id krL7plUgsda4 for ; Fri, 13 Jun 2014 15:04:59 +0000 (UTC) Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by restaurant.gnome.org (Postfix) with ESMTP id B77837697B for ; Fri, 13 Jun 2014 15:04:39 +0000 (UTC) Received: by mail-ob0-f169.google.com with SMTP id wp18so2996865obc.0 for ; Fri, 13 Jun 2014 08:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=PGx0aLPIwuhAMGEVBFQOfF7nrSmpuNZdeaKfd17zu/8=; b=yNC81IIYw7gne0FlXZ7nBqs7fomYwvmADLUtOeCfPCDZ8TQilMLzwXrfZ6sNRQNH5F /Od7VmK6uvNasmSm6qZVZszgVruSraarH2jAnmO4dTb4ZJNypyMSaf569ZMFCDpVZw3L gsfsXTVfzN/oT6zMCorNCwdgUzgrZO/NnMz+2F4oxMYvUUyE4/jnSWOT4QMnFYu8lOF5 +xjlYb1VVGG10XVwm9lXZbeL0tRqjYw0QXtEkKcpSPQ9Kq2YcgofhaqZVD6jx6amuLrh ZaLgB/D6wxL9wEzhFW7Zln2tzDDcA2gqeFBNBMU/QSp2SDXY98a38HDaJN/VCCY32Ymi RaRw== MIME-Version: 1.0 X-Received: by 10.60.45.233 with SMTP id q9mr3341684oem.37.1402671877708; Fri, 13 Jun 2014 08:04:37 -0700 (PDT) Received: by 10.76.189.136 with HTTP; Fri, 13 Jun 2014 08:04:37 -0700 (PDT) Date: Fri, 13 Jun 2014 08:04:37 -0700 Message-ID: From: Chris Healy To: xml@gnome.org Content-Type: multipart/alternative; boundary=001a11c20cac01e31704fbb8ffcf Subject: [xml] libxml2 and SSE4.2 optimizations X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 15:05:00 -0000 --001a11c20cac01e31704fbb8ffcf Content-Type: text/plain; charset=UTF-8 I am working on a project that uses libxml2 extensively that also uses a newer Intel chipset. I'm looking to improve it's performance and have read that the newer Intel chipsets have new instructions (SSE4.2) that can help accelerate XML parsing: https://software.intel.com/en-us/articles/xml-parsing-accelerator-with-intel-streaming-simd-extensions-4-intel-sse4/ Are the methods discussed in this whitepaper applicable to libxml2? Are there any technical reasons why this could not / should not be done? Regards, Chris --001a11c20cac01e31704fbb8ffcf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I am working on a project that uses libxml2 extensive= ly that also uses a newer Intel chipset.=C2=A0 I'm looking to improve it's performance= and have=20 read that the newer Intel chipsets have new instructions (SSE4.2) that=20 can help accelerate XML parsing:

https://software.intel.com/en-us/articles/xml-parsing-accelerator-with-int= el-streaming-simd-extensions-4-intel-sse4/


Are the methods discussed in this whitepaper applicable = to libxml2?=C2=A0 Are there any technical reasons why this could not / shou= ld not be done?

Regards,

Chris
--001a11c20cac01e31704fbb8ffcf-- From phrosty@gmail.com Fri Jun 13 16:10:36 2014 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by restaurant.gnome.org (Postfix) with ESMTP id 74B2D769A8 for ; Fri, 13 Jun 2014 16:10:36 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.7 X-Spam-Level: X-Spam-Status: No, score=-2.7 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham Received: from restaurant.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LnPUWFXNXUa7 for ; Fri, 13 Jun 2014 16:10:35 +0000 (UTC) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by restaurant.gnome.org (Postfix) with ESMTP id 23DF076995 for ; Fri, 13 Jun 2014 16:10:14 +0000 (UTC) Received: by mail-ve0-f178.google.com with SMTP id oy12so1672144veb.9 for ; Fri, 13 Jun 2014 09:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=EKbxfwsVg/JQyLxILdNX6aLUy9/g1Bg7AjRea1nuNtg=; b=H/iYH7wcsm//kP/NVUPAvfiLBv5UriZIzZGXpAYc09R8kA4qyKTCXmi0RIZPKSp9bP nY/cwL2ZptuJdLIwDrDKEtowjyis4WMMouiEQIddN0hMKKNOP+y3eobg/BYZiv5IpqWd G/e/DJYBLXUOZhQJPpotBCeoFWV3q9lGipzkRChD/jjgk9QT1i76BiiMQFnzVhbRmoxz snxZA1++dv+ZF3rkYEJAs/Fo6RXVPmIx8w5i4dEL/JgsQbXJnKpnWqOE5pFCt+a5WL66 UQbU1PxRKUPi+NowjQH7IvyJW+3lzNY5ZLy18FxvI3B+nxzoREHYlNyVegUbadsa0TyY JEeQ== MIME-Version: 1.0 X-Received: by 10.53.10.234 with SMTP id ed10mr45226vdd.86.1402675813001; Fri, 13 Jun 2014 09:10:13 -0700 (PDT) Received: by 10.58.91.132 with HTTP; Fri, 13 Jun 2014 09:10:12 -0700 (PDT) In-Reply-To: References: Date: Fri, 13 Jun 2014 11:10:12 -0500 Message-ID: From: Cory Nelson To: Chris Healy Content-Type: text/plain; charset=UTF-8 Cc: "xml@gnome.org" Subject: Re: [xml] libxml2 and SSE4.2 optimizations X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 16:10:36 -0000 Based purely on my own experience, these provide mixed benefit to a fully validating parser. It depends on your input and how willing you are to specialize. For XML 1.0, valid code points are explicit and there are a ton of them. It's not something easily fit into this SSE model. You're still going to end up checking each code point individually and a simple LUT already does this really quickly. You may be able to speed this up somewhat by special-casing when you're decoding UTF-8 and all bytes represent a single code point. On Fri, Jun 13, 2014 at 10:04 AM, Chris Healy wrote: > I am working on a project that uses libxml2 extensively that also uses a > newer Intel chipset. I'm looking to improve it's performance and have read > that the newer Intel chipsets have new instructions (SSE4.2) that can help > accelerate XML parsing: > > https://software.intel.com/en-us/articles/xml-parsing-accelerator-with-intel-streaming-simd-extensions-4-intel-sse4/ > > > Are the methods discussed in this whitepaper applicable to libxml2? Are > there any technical reasons why this could not / should not be done? > > Regards, > > Chris > > _______________________________________________ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > https://mail.gnome.org/mailman/listinfo/xml > -- Cory Nelson http://int64.org