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
View this message in rfc822 format
> Cc: mail <at> daniel-mendler.de, eggert <at> cs.ucla.edu, 75569 <at> debbugs.gnu.org
> Date: Sun, 19 Jan 2025 12:52:39 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > From: Juri Linkov <juri <at> linkov.net>
> > Cc: mail <at> daniel-mendler.de, Paul Eggert <eggert <at> cs.ucla.edu>,
> > 75569 <at> debbugs.gnu.org
> > Date: Sat, 18 Jan 2025 19:31:34 +0200
> >
> > >> > Then how about
> > >> >
> > >> > if ((regular && st.st_size > 0) || (!regular && seekable) || !NILP (end))
> > >>
> > >> That should work too but I expect we're overthinking it; see bellow.
> > >
> > > Juri and Daniel, could you please try the change above?
> >
> > There are many large files under /proc that you can try
> > such as /proc/kallsyms.
>
> Ah, thanks.
>
> > I tried the change above, and it works.
> >
> > >> > That would exclude non-regular files that are seekable, which would be
> > >> > a regression, I think.
> > >>
> > >> I expect it's a bugfix not a regression. For such files, end_offset
> > >> is TYPE_MAXIUMUM (off_t), which Emacs will try to create an enormous buffer.
> > >
> > > Juri and Daniel, could you also try
> > >
> > > if ((regular && st.st_size > 0) || !NILP (end))
> > >
> > > instead?
> >
> > This works as well.
>
> Thanks for testing.
Actually... are you sure these changes fixed the problem? I've
installed one of them, and /proc/kallsyms is not read in its entirety.
Which file did you try this with, and what is its real size?
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.