On 8/12/25 11:29 PM, Nathan Mills wrote:
Bash Version: 5.2 Patch Level: 37 Release Status: releaseAffected Bash versions: 5.2.37, 5.3.0-gf6cfb14 (Aug 8, 2025), possibly other versions Description: Bash 5.3 crashes appending to array being declared
Thanks for the detailed report and analysis. This is specific to the `_' variable and simple commands. The problem isn't the temporary environment, but the way the simple command execution sets `_' to the last argument to the command after expansion: it doesn't consider that the temporary environment might contain `_' as an array variable (which it normally should not). Here's the simple fix. *** ../bash-5.3-patched/execute_cmd.c Thu Jun 5 11:02:01 2025 --- execute_cmd.c Thu Aug 14 08:58:17 2025 *************** *** 4192,4196 **** if (arg == 0) arg = ""; ! var = bind_variable ("_", arg, 0); if (var) VUNSETATTR (var, att_exported); --- 4157,4161 ---- if (arg == 0) arg = ""; ! var = bind_variable ("_", arg, ASS_NOTEMPENV); if (var) VUNSETATTR (var, att_exported); Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature