GNU bug report logs - #75569
30.0.93; Large /proc/* file are read incompletely

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Wed, 15 Jan 2025 00:22:01 UTC

Severity: normal

Found in version 30.0.93

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: mail <at> daniel-mendler.de, 75569 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: bug#75569: 30.0.93; Large /proc/* file are read incompletely
Date: Thu, 16 Jan 2025 10:55:46 +0200
> Date: Wed, 15 Jan 2025 22:58:31 -0800
> Cc: juri <at> linkov.net, mail <at> daniel-mendler.de, 75569 <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> 
> On 2025-01-15 22:18, Eli Zaretskii wrote:
> 
> > So you are saying that the condition should be
> > 
> >     if ((regular && st.st_size > 0) || seekable || !NILP (end))
> 
> regular implies seekable, so that doesn't look right either.

Then how about

  if ((regular && st.st_size > 0) || (!regular && seekable) || !NILP (end))

> I was 
> thinking that rather than replace "seekable" with "(seekable && st.size 
>  > 0)" or with "(regular && st.st_size > 0) || seekable", one should 
> replace "seekable" with "(regular && st.st_size > 0)".

That would exclude non-regular files that are seekable, which would be
a regression, I think.

> There's another thing. On some platforms these /proc regular files have 
> nonzero size. On at least one of these platforms (Solaris) the size is 
> accurate (though it may change at any time); on others, I vaguely recall 
> that it's a small nonzero fixed size (I don't remember which systems do 
> that, unfortunately).

If the size is non-zero and accurate, it should already work, because
this is just how "normal" files behave.  If the size is non-zero and
inaccurate, do we currently support that, e.g., if the file grows
while we read it?




This bug report was last modified 162 days ago.

Previous Next


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