From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QIoOE3nNkGKL0AAAbAwnHQ (envelope-from ) for ; Fri, 27 May 2022 15:09:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6C7vEnnNkGKbFQAAauVa8A (envelope-from ) for ; Fri, 27 May 2022 15:09:13 +0200 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 0866A2C275 for ; Fri, 27 May 2022 15:09:12 +0200 (CEST) Received: from localhost ([::1]:45038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuZiK-0001cD-0U for larch@yhetil.org; Fri, 27 May 2022 09:09:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuZeJ-0005XR-S2 for guix-patches@gnu.org; Fri, 27 May 2022 09:05:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39205) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuZeI-0005bS-Ui for guix-patches@gnu.org; Fri, 27 May 2022 09:05:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nuZeI-0001tP-N8 for guix-patches@gnu.org; Fri, 27 May 2022 09:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55673] [PATCH] cache: Catch valid integer for 'last-expiry-cleanup'. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 May 2022 13:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55673 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 55673@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 55673-submit@debbugs.gnu.org id=B55673.16536566997262 (code B ref 55673); Fri, 27 May 2022 13:05:02 +0000 Received: (at 55673) by debbugs.gnu.org; 27 May 2022 13:04:59 +0000 Received: from localhost ([127.0.0.1]:33102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuZeE-0001t4-WB for submit@debbugs.gnu.org; Fri, 27 May 2022 09:04:59 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:43804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuZeA-0001ss-GE for 55673@debbugs.gnu.org; Fri, 27 May 2022 09:04:58 -0400 Received: from [172.20.10.5] ([188.188.246.167]) by albert.telenet-ops.be with bizsmtp id bp4s270013dS87Q06p4sVk; Fri, 27 May 2022 15:04:53 +0200 Message-ID: <02f4e72bba800a2f59064a8bf628357b5a96f1d6.camel@telenet.be> From: Maxime Devos Date: Fri, 27 May 2022 15:04:47 +0200 In-Reply-To: References: <20220527082519.501697-1-zimon.toutoune@gmail.com> <9432b1161007faacc0bd0e58da0bf839e2e8ec39.camel@telenet.be> <24883447c6f3d9b27bcc6e11e117ee974916e091.camel@telenet.be> <9483424cc3c89e5fa83ccc1e22b1f6cc7d04dd95.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-lt5QqNA0CMplr2EWDoC4" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1653656693; bh=7n2dYR0qKlCCgCHeyLhs4Tnr4Z0UqkNTU7zeJVVVPqY=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=GG8oAKM3SqQ++VqJjpB1kUWa8Ydopj+ACbkYkdoxRnIw13MDbfAbf883/Vy3qyvKy aPTPpwnRaQ3qD84BkEOvj7Q0HIO3YFwf/fkd89Jv9OGmoiKquEjxCQz/j4uE8yvsWD 2aHPqSjTax1MDTw9yWwZAJ9JQwCfaaWcDse3fLfkE6ztKzTvdoxzLVTF8hs3hnhcwH 521ZLblHbtLxVbwnJRcTLGzQsShVCXqtCZ4aLAMHMZZ4KmhhU3FkAFzXPta5OAf5dO Ua35HhnZXaFCDTtv0TW5Q/sR9BX/kL48VgIc41uKbeetIp6yQf+h3aCaC+lhm8f0nR ub/BiPGz77GLg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653656953; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=7n2dYR0qKlCCgCHeyLhs4Tnr4Z0UqkNTU7zeJVVVPqY=; b=W2+6ehboytFoOfE9T89f/6BJM+ybgQ8YCfsToXDaj9335JdsXrRn9cUhDJmwyxi80dyFky Ho5K7vvTSJF3x1KtgqDVCIkaFcH1Y4EXZO0/Kty0cKTIWphGtgcMoctpLvcYWSmHK7N4Vg SvWVLgXfbi8PVK9Q8Mhfppw+mwYgjR0kuw3QtI5tYXAGj9IdcDfQ1hGXpK0opnhp+HNGQG b7fl76P7z+VyMccRgPWotw5U1y36sTM9C5F1edkRJdEcWxcgofyuOAF9UCvmnnZOT5zmEt Cv3o69x9qmVAe3M/IC8iBTz2ue+VAxClkP5ogl/gUHQwrVbiAX93qKVzJGG69A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653656953; a=rsa-sha256; cv=none; b=e8FkgYwNCXRYy9jdRP9snuNgmTaTsLEESccyS4gMwbEImQeEWYApCLIcFwSueuwiW+ly4e E3qEXpsOlxv3CLoXPn9Cqy9T8ZVg5Ogxbf/MwLukE21uv7SzJt2/YWfblOy+Mw+mlqcQ96 hxcQEvKLlbgcxILcToQgnNrQpO1b1V/Bwc/nSgKpiwAkZuTv5R+j0H3yV3D/ui8GlcwU4K UuhH8jv5/il6n2QSebsaHy7oxEA5qx045ZZ4b/lkhQgH0yU8Q81I0Mydt44UPOxnbwZwH2 99/ZejQYuvzfMp6iuaO3r73p4Drm5/UbtWmydu7bmM1nALXdhxfYF65IWFXEuQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=GG8oAKM3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 3.05 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=GG8oAKM3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0866A2C275 X-Spam-Score: 3.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: cn91mxUD4BXi --=-lt5QqNA0CMplr2EWDoC4 Content-Type: multipart/mixed; boundary="=-SfM7dMVCjZs/3NNglwL8" --=-SfM7dMVCjZs/3NNglwL8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable zimoun schreef op vr 27-05-2022 om 14:40 [+0200]: > > These old 4 bytes could be the ASCII representation of > >=20 > > =C2=A0=C2=A0 "foo > >=20 > > .=C2=A0 Then, when 'read' is run (after rebooting), it sees an > > incomplete > > string "foo, so it fails. >=20 > The question is how would 'read' fail or what would 'read' return? > For instance, the patch works for these cases: >=20 > =C2=A0- empty file > =C2=A0- non-integer >=20 > Now, if you are able to generate an incomplete file (from an integer > or whatever) against the patch fails, then we can examine.=C2=A0 However, > I > miss what would be the difference between this incomplete file and, > let say, this case: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0 echo -n -e \\x12 > ~/.cache/guix/inferiors/last-= expiry-cleanup >=20 > handled by the patch. The incomplete file is: "foo as mentioned previously. Here's how it fails: scheme@(guile-user)> (call-with-input-file "a" read) ice-9/boot-9.scm:1669:16: In procedure raise-exception: In procedure scm_lreadr: a:2:1: end of file in string constant The difference is that ^R is interpreted as a symbol, whereas "foo cannot be interpreted as anything at all by 'read'. Greetings, Maxime. --=-SfM7dMVCjZs/3NNglwL8 Content-Disposition: attachment; filename="a" Content-Type: text/plain; name="a"; charset="us-ascii" Content-Transfer-Encoding: quoted-printable "foo --=-SfM7dMVCjZs/3NNglwL8-- --=-lt5QqNA0CMplr2EWDoC4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYpDMbxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uY/AP0YSCfNMQK5NfD6dmr2mNvFQ/1D TSSH+3utwWSQeKo6FQEA1QbRLfGgqk2X3jSsMyhG3FnjPVROqsl3RDX94wpzcAU= =rsM8 -----END PGP SIGNATURE----- --=-lt5QqNA0CMplr2EWDoC4--