unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9800: Incomplete truncated file buffers from the /proc filesystem
@ 2011-10-19 22:59 Juri Linkov
  2011-10-20  8:22 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Juri Linkov @ 2011-10-19 22:59 UTC (permalink / raw)
  To: 9800

Large files from the /proc filesystem are visited incompletely,
their file buffers are truncated at the position 65536.
One possible test case to reproduce this is to load enough libraries
with e.g. (imagemagick-register-types) and visit Emacs's maps file
in /proc/$PID/maps.

Andreas said in http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg00782.html
that it's due to this code in `insert-file-contents':

	  /* The file size returned from stat may be zero, but data
	     may be readable nonetheless, for example when this is a
	     file in the /proc filesystem.  */
	  if (end_offset == 0)
	    end_offset = READ_BUF_SIZE;

How this could be fixed?  Should it keep reading while more data can be
read from the file?





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-02-13 20:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-19 22:59 bug#9800: Incomplete truncated file buffers from the /proc filesystem Juri Linkov
2011-10-20  8:22 ` Eli Zaretskii
2011-10-20  8:44   ` Andreas Schwab
2023-02-12  7:38     ` Eli Zaretskii
2023-02-12  9:24       ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2011-10-24  2:53 ` Paul Eggert
2011-10-24 21:50   ` Richard Stallman
2011-10-24 22:02     ` Paul Eggert
2023-02-12 10:21       ` Arsen Arsenović via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-13 20:47         ` Paul Eggert
2011-11-03 20:32   ` Lars Magne Ingebrigtsen
2011-11-04  9:36     ` Juri Linkov
2011-11-04 10:54       ` Eli Zaretskii
2022-02-07  0:10 ` Lars Ingebrigtsen
2022-02-07 19:41   ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).