From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KMbVE6mvFWQevwAASxT56A (envelope-from ) for ; Sat, 18 Mar 2023 13:33:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id djOzE6mvFWTW2gAA9RJhRA (envelope-from ) for ; Sat, 18 Mar 2023 13:33:45 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 23F44158C0 for ; Sat, 18 Mar 2023 13:33:44 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679142825; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=EHYb6ALxtn2AnFMj5tMzxWmfdM3WR0tIijO/g9mMi+8=; b=UTeCzywCaN8cW6KDIz8bjMdJxfHBxt0wXfMwIE6T1KzQyBFZ5eKUpeeGCoCMRyJWew+/TA z9d1mURCwy/b1TSsoyXiLLMkebSbZDoUPz/DeXrFMGzI/DrL6HZjD16ED6VVkKeA0+VFY1 3MFA74WMnDJumxCUklsTZb/ZV8NspMOeWVySAyyfEn4FlNH++63PpPHhhpzbb8kTm73HvT WxQYYBEYl2Tgv66ICz1InQFRW0V68CmYWfNp1llJBdugkhjk/g1vyER/QExrHeBjEox1xO 6asRlKwPJcOeZq8tlpF0EzhT2JN09pzFgZNAUoHG9/yjFxvOiP+vdte6ei8KaQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679142825; a=rsa-sha256; cv=none; b=bb8I/7ww9FWgeldy+slz6pReNBQ4gQWOhXHb1NWSe2h7bxikGWF0BcZJ+VE2tb81a1fQQI 3aPhAskwLzXxByY8N3hr+fKzZ6KcoudBSTfSNcdAOQ5t5/FTo8DMhUtyGgrSEQbswC6Kha a67/yWsznSWq815CcK1V0TyHqWnwUUzIrTRRLfwuEs0Mu/gGQ4la9+UJAzQ8vHOk0iWQj8 o9+ksOAWsp3QS0rfDzBHotvtXcY8aSJZbRV12zAzj71p+wdgdzD8Yl6t4xs70BwJdYMaM5 pT4xjiyg71rDu2Xllur6l83IdnM1hgX2fvpdeE69VOG8mveku342mZOhQo+o4A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdVkH-0002LW-CT; Sat, 18 Mar 2023 08:33:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdVkE-0002L8-9k for guix-devel@gnu.org; Sat, 18 Mar 2023 08:33:11 -0400 Received: from hera.aquilenet.fr ([2a0c:e300::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdVkC-0000Wg-6L for guix-devel@gnu.org; Sat, 18 Mar 2023 08:33:10 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B9B0EB9D; Sat, 18 Mar 2023 13:33:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jedLXwXYpC94; Sat, 18 Mar 2023 13:33:01 +0100 (CET) Received: from jurong (unknown [IPv6:2001:861:c4:f2f0::c64]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 180AC3C; Sat, 18 Mar 2023 13:33:00 +0100 (CET) Date: Sat, 18 Mar 2023 13:32:59 +0100 From: Andreas Enge To: guix-devel@gnu.org Subject: Procps in core-updates Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ypCb3Q4tgEtgVOL6" Content-Disposition: inline Received-SPF: pass client-ip=2a0c:e300::1; envelope-from=andreas@enge.fr; helo=hera.aquilenet.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 23F44158C0 X-Spam-Score: -2.85 X-Migadu-Spam-Score: -2.85 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: o2yAo/i4DgAu --ypCb3Q4tgEtgVOL6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, procps fails its tests on core-updates when built with --system=i686-linux (it succeeds on x86_64). The error is completely not understandable (and Debian has disabled the test). I modified the test file as attached; my changes are to compute the value val separately before the "if" (interestingly enough, the variable declaration "double val;" was already there), and I added the fprintf at the beginnings of the lines. The test then fails and prints CMP 1 CMP 0 DIF 0.000000 FAIL: strtod_nol_or_err("123") != 123.000000 So val != tests[i].result when the "if" is executed, this is still the case for the first fprintf, and then changes for the second fprintf. Has anyone got any explanation for this behaviour? A compiler error? Here: https://www.freelists.org/post/procps/strtod-nol-or-err-on-32bit-Was-procps-3312-released,2 the conclusion is "Ive got a pending patch to just remove it. Floating point math sucks when it comes to equality." but this is not even floating point maths - whatever the contents of val and tests[i].result, they should not be changed by a comparison (or an fprintf; I can also make the test work just by adding some printf into the strtod_nol_or_err function that is exercised by this test). Andreas --ypCb3Q4tgEtgVOL6 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="test_strtod_nol.c" #include #include #include "strutils.h" struct strtod_tests { char *string; double result; }; struct strtod_tests tests[] = { {"123", 123.0}, {"-123", -123.0}, {"12.34", 12.34}, {"-12.34", -12.34}, {".34", 0.34}, {"-.34", -0.34}, {"12,34", 12.34}, {"-12,34", -12.34}, {",34", 0.34}, {"-,34", -0.34}, {"0", 0.0}, {".0", 0.0}, {"0.0", 0.0}, {NULL, 0.0} }; int main(int argc, char *argv[]) { int i; double val; for(i=0; tests[i].string != NULL; i++) { val = strtod_nol_or_err(tests[i].string, "Cannot parse number"); if (val != tests[i].result) { fprintf(stderr, "CMP %i\n", val != tests[i].result); fprintf(stderr, "CMP %i\n", val != tests[i].result); fprintf(stderr, "DIF %f\n", val - tests[i].result); fprintf(stderr, "FAIL: strtod_nol_or_err(\"%s\") != %f\n", tests[i].string, tests[i].result); return EXIT_FAILURE; } //fprintf(stderr, "PASS: strtod_nol for %s\n", tests[i].string); } return EXIT_SUCCESS; } --ypCb3Q4tgEtgVOL6--