GNU bug report logs -
#75569
30.0.93; Large /proc/* file are read incompletely
Previous Next
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
Message #17 received at 75569 <at> debbugs.gnu.org (full text, mbox):
> From: Juri Linkov <juri <at> linkov.net>
> Cc: Paul Eggert <eggert <at> cs.ucla.edu>, mail <at> daniel-mendler.de,
> 75569 <at> debbugs.gnu.org
> Date: Wed, 15 Jan 2025 19:08:03 +0200
>
> > But maybe commits 8650b3308dd and/or 3fb2c174d3a7 broke that later?
>
> I confirm that reverting 8650b3308dd fixes it again after removing 'seekable'.
Thanks. Can you try the patch below?
> > The /proc/cpuinfo file on the system to which I have access is smaller
> > than 16KB, so could someone who can access a larger cpuinfo file
> > please see if those commits broke the fix, or maybe bisect?
>
> To be able to test it you need at least 16 cpu cores. If this is
> not feasible, a simpler way would be just to try on another file
> such as /proc/crypto.
/proc/crypto here is also less than 16KB, so I still cannot test.
diff --git a/src/fileio.c b/src/fileio.c
index db7c491..a296970 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4747,7 +4747,7 @@ DEFUN ("insert-file-contents", Finsert_file_contents, Sinsert_file_contents,
goto handled;
}
- if (seekable || !NILP (end))
+ if ((seekable && st.size > 0) || !NILP (end))
total = end_offset - beg_offset;
else
/* For a special file, all we can do is guess. */
This bug report was last modified 163 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.