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?

(*) And for the benefit of those following along at home.

(**) I.e., was it a mistake for bash to have been changed in this way
(i.e., to have introduced this problem as part of the changes in 5.3)
in the first place?

=================================================================================
Please do not send me replies to my posts on the list.
I always read the replies via the web archive, so CC'ing to me is unnecessary.

When responding to my posts, please try to refrain from giving bureaucratic 
answers.
If you have nothing useful to say, then just click Next and go on.

Reply via email to