Debian Bug report logs - #570727
fails when comparing minimal trees on i386

version graph

Package: xmldiff; Maintainer for xmldiff is Alexandre Fayolle <afayolle@debian.org>; Source for xmldiff is src:xmldiff.

Reported by: Bastian Blank <waldi@debian.org>

Date: Sat, 20 Feb 2010 22:51:01 UTC

Severity: grave

Tags: confirmed, patch, upstream

Found in version xmldiff/0.6.8-4.1

Fixed in version xmldiff/0.6.8-4.2

Done: Stefano Zacchiroli <zack@debian.org>

Bug is archived. No further changes may be made.

Forwarded to http://www.logilab.org/ticket/21853

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Alexandre Fayolle <afayolle@debian.org>:
Bug#570727; Package xmldiff. (Sat, 20 Feb 2010 22:51:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bastian Blank <waldi@debian.org>:
New Bug report received and forwarded. Copy sent to Alexandre Fayolle <afayolle@debian.org>. (Sat, 20 Feb 2010 22:51:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Bastian Blank <waldi@debian.org>
To: submit@bugs.debian.org
Subject: xmldiff - Unable to compare minimal tree
Date: Sat, 20 Feb 2010 23:50:02 +0100
Package: xmldiff
Version: 0.6.8-4.1
Severity: grave

xmldiff is not able to compare a minimal tree with itself. As I would consider
this the minimal tree with any information, this makes the whole tool unusable.

| $ cat test.xml 
| <test test="test" />
| $ xmldiff test.xml test.xml
| [append-first, /,
| Traceback (most recent call last):
|   File "/usr/bin/xmldiff", line 4, in <module>
|     main.run()
|   File "/usr/lib/python2.5/site-packages/xmldiff/main.py", line 255, in run
|     encoding, html)
|   File "/usr/lib/python2.5/site-packages/xmldiff/main.py", line 117, in process_files
|     strategy.process_trees(tree1, tree2)
|   File "/usr/lib/python2.5/site-packages/xmldiff/fmes.py", line 104, in process_trees
|     self._formatter.end()
|   File "/usr/lib/python2.5/site-packages/xmldiff/format.py", line 80, in end
|     self.format_action(action)
|   File "/usr/lib/python2.5/site-packages/xmldiff/format.py", line 105, in format_action
|     xml_print(action[A_N2])
|   File "/usr/lib/python2.5/site-packages/xmldiff/objects.py", line 180, in xml_print
|     _xml_print_internal_format(node, indent, stream)
|   File "/usr/lib/python2.5/site-packages/xmldiff/objects.py", line 191, in _xml_print_internal_format
|     n[N_CHILDS][0][N_VALUE])
| IndexError: list index out of range

Bastian

-- 
Spock: We suffered 23 casualties in that attack, Captain.




Information forwarded to debian-bugs-dist@lists.debian.org, Alexandre Fayolle <afayolle@debian.org>:
Bug#570727; Package xmldiff. (Tue, 23 Feb 2010 10:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefano Zacchiroli <zack@debian.org>:
Extra info received and forwarded to list. Copy sent to Alexandre Fayolle <afayolle@debian.org>. (Tue, 23 Feb 2010 10:51:03 GMT) Full text and rfc822 format available.

Message #10 received at 570727@bugs.debian.org (full text, mbox):

From: Stefano Zacchiroli <zack@debian.org>
To: Bastian Blank <waldi@debian.org>, 570727@bugs.debian.org
Subject: Re: Bug#570727: xmldiff - Unable to compare minimal tree
Date: Tue, 23 Feb 2010 11:49:57 +0100
tags 570727 + unreproducible
thanks

On Sat, Feb 20, 2010 at 11:50:02PM +0100, Bastian Blank wrote:
> xmldiff is not able to compare a minimal tree with itself. As I would
> consider this the minimal tree with any information, this makes the
> whole tool unusable.
> 
> | $ cat test.xml 
> | <test test="test" />
> | $ xmldiff test.xml test.xml

I can't reproduce this:

  zack@usha:/tmp$ cat test.xml 
  <test test="test" />
  zack@usha:/tmp$ xmldiff test.xml test.xml 
  zack@usha:/tmp$ echo $?
  0

(As your bug log does not contain architecture information, I can't say
 if this is arch-specific or not, even though I doubt it. I'm on amd64,
 FWIW.)

Can you please attach the test.xml file with which you can reproduce
this bug? Maybe it is not XML-well-formed due to some byte encoding
issues? Can you please try to run xmllint on it?

TIA,
Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime




Added tag(s) unreproducible. Request was from Stefano Zacchiroli <zack@debian.org> to control@bugs.debian.org. (Tue, 23 Feb 2010 10:51:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Alexandre Fayolle <afayolle@debian.org>:
Bug#570727; Package xmldiff. (Tue, 23 Feb 2010 12:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bastian Blank <waldi@debian.org>:
Extra info received and forwarded to list. Copy sent to Alexandre Fayolle <afayolle@debian.org>. (Tue, 23 Feb 2010 12:06:03 GMT) Full text and rfc822 format available.

Message #17 received at 570727@bugs.debian.org (full text, mbox):

From: Bastian Blank <waldi@debian.org>
To: Stefano Zacchiroli <zack@debian.org>
Cc: 570727@bugs.debian.org
Subject: Re: Bug#570727: xmldiff - Unable to compare minimal tree
Date: Tue, 23 Feb 2010 13:02:55 +0100
On Tue, Feb 23, 2010 at 11:49:57AM +0100, Stefano Zacchiroli wrote:
> (As your bug log does not contain architecture information, I can't say
>  if this is arch-specific or not, even though I doubt it. I'm on amd64,
>  FWIW.)

Well, it is. On amd64 it succeds, on i386 it fails.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages xmldiff depends on:
ii  libc6                        2.10.2-5    Embedded GNU C Library: Shared lib
ii  python                       2.5.4-9     An interactive high-level object-o
ii  python-central               0.6.14+nmu2 register and build utility for Pyt

xmldiff recommends no packages.

Versions of packages xmldiff suggests:
pn  python-psyco                  <none>     (no description available)
pn  xmldiff-xmlrev                <none>     (no description available)

-- no debconf information

-- 
Virtue is a relative term.
		-- Spock, "Friday's Child", stardate 3499.1




Information forwarded to debian-bugs-dist@lists.debian.org, Alexandre Fayolle <afayolle@debian.org>:
Bug#570727; Package xmldiff. (Tue, 23 Feb 2010 13:24:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefano Zacchiroli <zack@debian.org>:
Extra info received and forwarded to list. Copy sent to Alexandre Fayolle <afayolle@debian.org>. (Tue, 23 Feb 2010 13:24:05 GMT) Full text and rfc822 format available.

Message #22 received at 570727@bugs.debian.org (full text, mbox):

From: Stefano Zacchiroli <zack@debian.org>
To: Bastian Blank <waldi@debian.org>
Cc: 570727@bugs.debian.org
Subject: Re: Bug#570727: xmldiff - Unable to compare minimal tree
Date: Tue, 23 Feb 2010 14:21:55 +0100
tags 570727 - unreproducible
tags 570727 + confirmed
retitle 570727 fails when comparing minimal trees on i386
thanks

On Tue, Feb 23, 2010 at 01:02:55PM +0100, Bastian Blank wrote:
> Well, it is. On amd64 it succeds, on i386 it fails.

I confirm that: I've been able to reproduce the bug inside an i386
chroot; retitling and tagging the bug appropriately. Thanks for your
feedback.

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime




Removed tag(s) unreproducible. Request was from Stefano Zacchiroli <zack@debian.org> to control@bugs.debian.org. (Tue, 23 Feb 2010 13:24:07 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Stefano Zacchiroli <zack@debian.org> to control@bugs.debian.org. (Tue, 23 Feb 2010 13:24:07 GMT) Full text and rfc822 format available.

Changed Bug title to 'fails when comparing minimal trees on i386' from 'xmldiff - Unable to compare minimal tree' Request was from Stefano Zacchiroli <zack@debian.org> to control@bugs.debian.org. (Tue, 23 Feb 2010 13:24:08 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Daiki Ueno <ueno@unixuser.org> to control@bugs.debian.org. (Mon, 15 Mar 2010 10:48:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Alexandre Fayolle <afayolle@debian.org>:
Bug#570727; Package xmldiff. (Mon, 15 Mar 2010 10:57:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daiki Ueno <ueno@unixuser.org>:
Extra info received and forwarded to list. Copy sent to Alexandre Fayolle <afayolle@debian.org>. (Mon, 15 Mar 2010 10:57:08 GMT) Full text and rfc822 format available.

Message #35 received at 570727@bugs.debian.org (full text, mbox):

From: Daiki Ueno <ueno@unixuser.org>
To: 570727@bugs.debian.org
Subject: Re: fails when comparing minimal trees on i386
Date: Mon, 15 Mar 2010 17:40:26 +0700
[Message part 1 (text/plain, inline)]
tags 570727 +patch
thanks

Hi,

The problem seems to be caused by id() calculation bug in the C
extension part of xmldiff.

xmldiff constructs a tuple like this:

  #define KEYSHAPE "(i,i)"

  PyObject *node1, ...;
  key = Py_BuildValue(KEYSHAPE, (size_t)node1, ...) ;

and its Python part refers to the tuple as (id(node1), ...).

This is problematic because the return value of id() would either be an
Int (fixed size) or a Long (arbitrary precision) object.  I think the
original problem can also observed on 64bit systems, but more likely on
32bit systems.

The attached patch will fix the problem (I'll notify the upstream
shortly).

[Message part 2 (application/pgp-signature, inline)]
[xmldiff-fix-id-calc.diff (text/x-diff, inline)]
diff -u xmldiff-0.6.8/debian/changelog xmldiff-0.6.8/debian/changelog
--- xmldiff-0.6.8/debian/changelog
+++ xmldiff-0.6.8/debian/changelog
@@ -1,3 +1,10 @@
+xmldiff (0.6.8-4.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix id() calculation in extensions/maplookup.c (Closes: #570727)
+
+ -- Daiki Ueno <ueno@unixuser.org>  Mon, 15 Mar 2010 17:16:23 +0700
+
 xmldiff (0.6.8-4.1) unstable; urgency=low
 
   * Non-maintainer upload.
only in patch2:
unchanged:
--- xmldiff-0.6.8.orig/extensions/maplookup.c
+++ xmldiff-0.6.8/extensions/maplookup.c
@@ -40,12 +40,6 @@
 
 
 /******************* functions specific to the fmes algorithm *****************/
-#if __WORDSIZE == 64
-#define KEYSHAPE "(l,l)"
-#else
-#define KEYSHAPE "(i,i)"
-#endif
-
 static short N_ISSUE = 5 ;
 
 /* function to init objects for the next functions
@@ -162,11 +156,17 @@
 	{
 		PyObject *key ;
 		couple = PyList_GET_ITEM(_mapping, i) ;
-                key = Py_BuildValue(KEYSHAPE, (size_t)node1, (size_t)PyTuple_GET_ITEM(couple, 0)) ;
+		key = PyTuple_New(2);
+		Py_INCREF(key);
+		PyTuple_SET_ITEM(key, 0, PyLong_FromVoidPtr(node1));
+		PyTuple_SET_ITEM(key, 1, PyLong_FromVoidPtr(PyTuple_GET_ITEM(couple, 0)));
 		if (PyDict_GetItem(_dict1, key) != NULL)
 		{
 			Py_DECREF(key) ;
-                        key = Py_BuildValue(KEYSHAPE, (size_t)node2, (size_t)PyTuple_GET_ITEM(couple, 1)) ;
+			key = PyTuple_New(2);
+			Py_INCREF(key);
+			PyTuple_SET_ITEM(key, 0, PyLong_FromVoidPtr(node2));
+			PyTuple_SET_ITEM(key, 1, PyLong_FromVoidPtr(PyTuple_GET_ITEM(couple, 1)));
 			if (PyDict_GetItem(_dict2, key) != NULL)
 			{
 				seq_num += 1 ;
[Message part 4 (text/plain, inline)]
Sent from Thailand Mini-DebCamp 2010 BSP:
http://wiki.debian.org/DebianThailand/MiniDebCamp2010/BSP

Regards,
-- 
Daiki Ueno

Added tag(s) upstream. Request was from <alexandre@fayauffre.org> to control@bugs.debian.org. (Mon, 15 Mar 2010 11:12:18 GMT) Full text and rfc822 format available.

Set Bug forwarded-to-address to 'http://www.logilab.org/ticket/21853'. Request was from <alexandre@fayauffre.org> to control@bugs.debian.org. (Mon, 15 Mar 2010 11:12:20 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Alexandre Fayolle <afayolle@debian.org>:
Bug#570727; Package xmldiff. (Thu, 18 Mar 2010 10:42:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefano Zacchiroli <zack@debian.org>:
Extra info received and forwarded to list. Copy sent to Alexandre Fayolle <afayolle@debian.org>. (Thu, 18 Mar 2010 10:42:07 GMT) Full text and rfc822 format available.

Message #44 received at 570727@bugs.debian.org (full text, mbox):

From: Stefano Zacchiroli <zack@debian.org>
To: 570727@bugs.debian.org
Cc: Daiki Ueno <ueno@unixuser.org>
Subject: xmldiff: diff for NMU version 0.6.8-4.2
Date: Thu, 18 Mar 2010 11:40:10 +0100
[Message part 1 (text/plain, inline)]
tags 570727 + pending
thanks

Dear maintainer,

I've prepared an NMU for xmldiff (versioned as 0.6.8-4.2) and uploaded
it to DELAYED/2, according to devref §5.11.1.  The patch is by Daiki
Ueno and has been applied upstream already; see changelog for more
details.

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime
[xmldiff-0.6.8-4.2-nmu.diff (text/x-diff, attachment)]

Added tag(s) pending. Request was from Stefano Zacchiroli <zack@debian.org> to control@bugs.debian.org. (Thu, 18 Mar 2010 10:42:15 GMT) Full text and rfc822 format available.

Reply sent to Stefano Zacchiroli <zack@debian.org>:
You have taken responsibility. (Sat, 20 Mar 2010 11:06:20 GMT) Full text and rfc822 format available.

Notification sent to Bastian Blank <waldi@debian.org>:
Bug acknowledged by developer. (Sat, 20 Mar 2010 11:06:20 GMT) Full text and rfc822 format available.

Message #51 received at 570727-close@bugs.debian.org (full text, mbox):

From: Stefano Zacchiroli <zack@debian.org>
To: 570727-close@bugs.debian.org
Subject: Bug#570727: fixed in xmldiff 0.6.8-4.2
Date: Sat, 20 Mar 2010 11:02:46 +0000
Source: xmldiff
Source-Version: 0.6.8-4.2

We believe that the bug you reported is fixed in the latest version of
xmldiff, which is due to be installed in the Debian FTP archive:

xmldiff-xmlrev_0.6.8-4.2_all.deb
  to main/x/xmldiff/xmldiff-xmlrev_0.6.8-4.2_all.deb
xmldiff_0.6.8-4.2.diff.gz
  to main/x/xmldiff/xmldiff_0.6.8-4.2.diff.gz
xmldiff_0.6.8-4.2.dsc
  to main/x/xmldiff/xmldiff_0.6.8-4.2.dsc
xmldiff_0.6.8-4.2_amd64.deb
  to main/x/xmldiff/xmldiff_0.6.8-4.2_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 570727@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Stefano Zacchiroli <zack@debian.org> (supplier of updated xmldiff package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 18 Mar 2010 11:14:40 +0100
Source: xmldiff
Binary: xmldiff xmldiff-xmlrev
Architecture: source all amd64
Version: 0.6.8-4.2
Distribution: unstable
Urgency: low
Maintainer: Alexandre Fayolle <afayolle@debian.org>
Changed-By: Stefano Zacchiroli <zack@debian.org>
Description: 
 xmldiff    - tree to tree correction between xml documents
 xmldiff-xmlrev - xmldiff output formatter
Closes: 570727
Changes: 
 xmldiff (0.6.8-4.2) unstable; urgency=low
 .
   * Non-maintainer upload.
   * Fix id() calculation in extensions/maplookup.c; that fixes comparison
     errors on minimal trees (on i386). Patch by Daiki Ueno, applied
     upstream (see http://www.logilab.org/ticket/21853). (Closes: #570727)
Checksums-Sha1: 
 03db993c8ae19a2738fea6daa820c89f550d6bbf 1113 xmldiff_0.6.8-4.2.dsc
 cddc41849707b444334baf4ecfbf70ea80e31cb5 4717 xmldiff_0.6.8-4.2.diff.gz
 d517dba9a3dbdda2b87c00c20651cb7269dc6ba5 8356 xmldiff-xmlrev_0.6.8-4.2_all.deb
 99fd8eb32f5c0e00232bc3819e50240ad376b0e7 55712 xmldiff_0.6.8-4.2_amd64.deb
Checksums-Sha256: 
 d96e896c1a2260859c624bdc5222c0f665762e6f0a91bc9d7af0111a3fc12787 1113 xmldiff_0.6.8-4.2.dsc
 bb0390a3d5eb36d6068405b926d3f250bf4379ebe48577d700eb866b3d346410 4717 xmldiff_0.6.8-4.2.diff.gz
 1bf3c4c68ca0c8f6fa40d0e997ae2cf7fe94524342648274d4c965c15ac3225f 8356 xmldiff-xmlrev_0.6.8-4.2_all.deb
 6e39ec8c47047ba470d1f6ff7c135b4a3de36971e0d7172f956afb687a20527a 55712 xmldiff_0.6.8-4.2_amd64.deb
Files: 
 0b4506ddd0d206029d704b627bceb25e 1113 misc optional xmldiff_0.6.8-4.2.dsc
 9fa53f64975b1aaa4e247e680107661f 4717 misc optional xmldiff_0.6.8-4.2.diff.gz
 fe668a796f268d9aa0ab3f9681d18ac2 8356 misc optional xmldiff-xmlrev_0.6.8-4.2_all.deb
 b924bc2c059d3de4e82fdd0539e9fb23 55712 misc optional xmldiff_0.6.8-4.2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD4DBQFLogJS1cqbBPLEI7wRAslrAJjFowj7dgx1hsVq/S8LJdy5IfbNAJ9lesmK
sEulJ2mInb9WqCJy09/0ig==
=Iovs
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 06 May 2010 07:44:33 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 13:36:11 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.