From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAbQG-0003YH-1c for guix-patches@gnu.org; Fri, 03 Nov 2017 08:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAbQA-000355-7O for guix-patches@gnu.org; Fri, 03 Nov 2017 08:50:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:40194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eAbQA-00034z-3B for guix-patches@gnu.org; Fri, 03 Nov 2017 08:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eAbQ9-0008TZ-T8 for guix-patches@gnu.org; Fri, 03 Nov 2017 08:50:01 -0400 Subject: [bug#29132] [PATCH] system: vm: Use 2^32 - 1 as hash size. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAbPR-0003Xy-JC for guix-patches@gnu.org; Fri, 03 Nov 2017 08:49:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAbPM-0002Ui-G4 for guix-patches@gnu.org; Fri, 03 Nov 2017 08:49:17 -0400 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:43339) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eAbPM-0002Sw-91 for guix-patches@gnu.org; Fri, 03 Nov 2017 08:49:12 -0400 Received: by mail-wm0-x231.google.com with SMTP id r68so1372366wmr.0 for ; Fri, 03 Nov 2017 05:49:11 -0700 (PDT) From: Mathieu Othacehe Date: Fri, 3 Nov 2017 13:49:04 +0100 Message-Id: <1509713344-16963-1-git-send-email-m.othacehe@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29132@debbugs.gnu.org * gnu/system/vm.scm (operating-system-uuid): Use 2^32 - 1 instead of 2^32 as hash size. On some 32 bit system (ARM for example), 2^32 exceeds hash max size (ULONG_MAX = 2^32 - 1). --- gnu/system/vm.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 3127b30..4424608 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -372,13 +372,13 @@ TYPE (one of 'iso9660 or 'dce). Return a UUID object." (bytevector->uuid (uint-list->bytevector (list (hash file-system-type - (expt 2 32)) + (- (expt 2 32) 1)) (hash (operating-system-host-name os) - (expt 2 32)) + (- (expt 2 32) 1)) (hash (operating-system-services os) - (expt 2 32)) + (- (expt 2 32) 1)) (hash (operating-system-file-systems os) - (expt 2 32))) + (- (expt 2 32) 1))) (endianness little) 4) type))) -- 2.7.4