On 11/22/25 4:47 AM, Stan Marsh wrote:
From:   Chet Ramey
Subject:        Re: [bug #67723] bash 5.3 breaks sourcing Linux sysfs uevent 
files
Date:   Fri, 21 Nov 2025 10:15:26 -0500

Linux uevent files contain lines in "VAR=value" style.
It's a common idiom under Linux to source uevent files with the shell and
print the value of some variable, like this:
(...)

Bash-5.3 checks whether or not the size of a regular file as reported by
stat(2) matches the number of bytes read. It uses the size to allocate a
buffer, so it can read the file in one chunk. That code went in in early
2023 as the result of a discussion about parser errors and EOF, and
whether the shell should exit as a result.

This uevent issue originally came up in July, in

https://lists.gnu.org/archive/html/bug-bash/2025-07/msg00031.html

I've appended the patch that resulted from the discussion.

So, just out of curiosity (*), are you saying that that patch should be
applied generally (**) or is it just that *if* you want a version of
bash that can read "uevent" files correctly, then you will have to
apply the patch and build a custom version of bash for your own use?

If you want to fix this particular issue before I issue a patch, then
apply this and build your own version. I will issue a patch for this;
it won't be the first time user-level code works around kernel
idiosyncracies.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to