GNU logs - #34683, boring messages

Message sent to bug-idutils@HIDDEN:

X-Loop: help-debbugs@HIDDEN
Subject: bug#34683: regression in file tree walker
Resent-From: Mike Gulick <mgulick@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at>>
Resent-CC: bug-idutils@HIDDEN
Resent-Date: Thu, 28 Feb 2019 15:36:02 +0000
Resent-Message-ID: <handler.34683.B.155136811018307 <at>>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 34683
X-GNU-PR-Package: idutils
To: 34683 <at>
X-Debbugs-Original-To: bug-idutils@HIDDEN
Received: via spool by submit <at> id=B.155136811018307
          (code B ref -1); Thu, 28 Feb 2019 15:36:02 +0000
Received: (at submit) by; 28 Feb 2019 15:35:10 +0000
Received: from localhost ([]:55383
	by with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at>>)
	id 1gzNiI-0004lD-2A
	for submit <at>; Thu, 28 Feb 2019 10:35:10 -0500
Received: from ([]:47675)
 by with esmtp (Exim 4.84_2)
 (envelope-from <mgulick@HIDDEN>) id 1gzNgK-0004hk-Gi
 for submit <at>; Thu, 28 Feb 2019 10:33:10 -0500
Received: from ([]:60552)
 by with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mgulick@HIDDEN>) id 1gzNgB-0002Zt-2F
 for submit <at>; Thu, 28 Feb 2019 10:33:01 -0500
Received: from ([]:33770)
 by with esmtp (Exim 4.71)
 (envelope-from <mgulick@HIDDEN>) id 1gzNg5-0005E3-3b
 for bug-idutils@HIDDEN; Thu, 28 Feb 2019 10:32:58 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by with spam-scanned (Exim 4.71)
 (envelope-from <mgulick@HIDDEN>) id 1gzNfz-0002US-35
 for bug-idutils@HIDDEN; Thu, 28 Feb 2019 10:32:49 -0500
Received: from ([2607:f8b0:4864:20::834]:34699)
 by with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <mgulick@HIDDEN>) id 1gzNfx-0002R6-0v
 for bug-idutils@HIDDEN; Thu, 28 Feb 2019 10:32:45 -0500
Received: by with SMTP id w4so23994230qtc.1
 for <bug-idutils@HIDDEN>; Thu, 28 Feb 2019 07:32:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025;
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025;
X-Gm-Message-State: AHQUAuY7cIqUGbhFLcBrbXnUVZe9JjDVFlF5SmQ8KOVPcIWCuplOsk7/
X-Google-Smtp-Source: AHgI3IYydk2dSvWBW7vV65UovZXpug/G1TiaRMIQy5Ch3mx/M+bQmCiK1K2WOy51e0qMneTa7+XvSg==
X-Received: by 2002:aed:35c6:: with SMTP id d6mr6947235qte.320.1551367959310; 
 Thu, 28 Feb 2019 07:32:39 -0800 (PST)
Received: from [] ([])
 by with ESMTPSA id s76sm6645598qki.42.2019.
 for <bug-idutils@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 28 Feb 2019 07:32:38 -0800 (PST)
From: Mike Gulick <mgulick@HIDDEN>
Message-ID: <4f5815f9-52e4-70ab-d72c-7b5311e6e066@HIDDEN>
Date: Thu, 28 Feb 2019 10:32:37 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US-large
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by Genre and OS details not
X-Received-From: 2607:f8b0:4864:20::834
X-detected-operating-system: by GNU/Linux 2.6.x
X-Spam-Score: 1.0 (+)
X-Mailman-Approved-At: Thu, 28 Feb 2019 10:35:07 -0500
X-BeenThere: debbugs-submit <at>
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <>
List-Unsubscribe: <>, 
 <mailto:debbugs-submit-request <at>>
List-Archive: <>
List-Post: <mailto:debbugs-submit <at>>
List-Help: <mailto:debbugs-submit-request <at>>
List-Subscribe: <>, 
 <mailto:debbugs-submit-request <at>>
Errors-To: debbugs-submit-bounces <at>
Sender: "Debbugs-submit" <debbugs-submit-bounces <at>>
X-Spam-Score: -0.0 (/)


I was testing the tip of the idutils, and I saw that a bunch of files
were getting left out of my idutils database.  I also see a bunch of
warnings about files being the same but different.  E.g.

$ ./src/mkid -m libidu/ -o test_db.ID /usr/include/
./mkid: warning: `/usr/include/wireless.h' and `/usr/include/pugiconfig.hpp' are the same file, but yield different scans!
./mkid: warning: `/usr/include/c++/8.2.1/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp' and `/usr/include/sodium.h' are the same file, but yield different scans!
./mkid: warning: `/usr/include/c++/8.2.1/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp' and `/usr/include/neaacdec.h' are the same file, but yield different scans!
./mkid: warning: `/usr/include/c++/8.2.1/ext/pb_ds/detail/rb_tree_map_/traits.hpp' and `/usr/include/faad.h' are the same file, but yield different scans!
./mkid: warning: `/usr/include/c++/8.2.1/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp' and `/usr/include/git2.h' are the same file, but yield different scans!
./mkid: warning: `/usr/include/guile/2.0/readline.h' and `/usr/include/c++/8.2.1/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp' are the same file, but yield different scans!

The issue seems to be in the last commit that changes
dev_ino_hash_compare.  This function is returning 1 (true) when the
dev_ino structs are identical and 0 (false) when different.  However
the hash table expects traditional comparator behavior (i.e. x - y).
The following patch fixes the issue for me.



diff --git a/libidu/walker.c b/libidu/walker.c
index b6a6109..e43f3f5 100644
--- a/libidu/walker.c
+++ b/libidu/walker.c
@@ -1141,9 +1141,16 @@ DEV_INO_HASH_DEFUN(dev_ino_hash_2, xform_NOT)
 static int
 dev_ino_hash_compare (void const *xv, void const *yv)
+  int result;
   struct dev_ino const *x = xv;
   struct dev_ino const *y = yv;
-  return x->di_ino == y->di_ino && x->di_dev == y->di_dev;
+  result = (x->di_ino > y->di_ino) - (x->di_ino < y->di_ino);
+  if (result)
+    return result;
+  result = (x->di_dev > y->di_dev) - (x->di_dev < y->di_dev);
+  return result;

Message sent:

Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Mike Gulick <mgulick@HIDDEN>
Subject: bug#34683: Acknowledgement (regression in file tree walker)
Message-ID: <handler.34683.B.155136811018307.ack <at>>
References: <4f5815f9-52e4-70ab-d72c-7b5311e6e066@HIDDEN>
X-Gnu-PR-Message: ack 34683
X-Gnu-PR-Package: idutils
Reply-To: 34683 <at>
Date: Thu, 28 Feb 2019 15:36:03 +0000

Thank you for filing a new bug report with

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):

If you wish to submit further information on this problem, please
send it to 34683 <at>

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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