Subject: Re: bug#75569: 30.0.93; Large /proc/* file are read incompletely

From: Paul Eggert <[email-masked]>
Date: Wed, 15 Jan 2025 13:08:10 -0800

On 2025-01-15 12:07, Eli Zaretskii wrote:
> -  if (seekable || !NILP (end))
> +  if ((seekable && st.size > 0) || !NILP (end))

Presumably you meant st.st_size. However, POSIX does not specify the 
value of st.st_size for every seekable file. Instead, when reading Emacs 
should look at st.st_size only for regular files, shared memory objects, 
and typed memory objects (the last two are rare enough that we don't 
need to bother to optimize for them).

Also, there are other uses of 'seekable' in the code that probably need 
a similar treatment.