GNU bug report logs -
#55673
[PATCH] cache: Catch valid integer for 'last-expiry-cleanup'.
Previous Next
Reported by: zimoun <zimon.toutoune <at> gmail.com>
Date: Fri, 27 May 2022 08:26:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
zimoun schreef op vr 27-05-2022 om 14:40 [+0200]:
> > These old 4 bytes could be the ASCII representation of
> >
> > "foo
> >
> > . Then, when 'read' is run (after rebooting), it sees an
> > incomplete
> > string "foo, so it fails.
>
> The question is how would 'read' fail or what would 'read' return?
> For instance, the patch works for these cases:
>
> - empty file
> - non-integer
>
> Now, if you are able to generate an incomplete file (from an integer
> or whatever) against the patch fails, then we can examine. However,
> I
> miss what would be the difference between this incomplete file and,
> let say, this case:
>
> echo -n -e \\x12 > ~/.cache/guix/inferiors/last-expiry-cleanup
>
> 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.
[a (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 2 years and 351 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.