]> git.ipfire.org Git - thirdparty/bash.git/blob - CWRU/changelog
Bash-5.0 patch 4: the wait builtin without arguments only waits for known children...
[thirdparty/bash.git] / CWRU / changelog
1 9/15/2016
2 ---------
3 [bash-4.4 released]
4
5 9/17
6 ----
7 builtins/common.c
8 - display_signal_list: if 0 is supplied as an argument to kill -l,
9 display a signal-out-of-range error. Fixes bug reported by
10 Martijn Dekker <martijn@inlv.org>
11
12 9/18
13 ----
14 print_cmd.c
15 - print_heredoc_bodies: take a list of redirections, all here documents,
16 and print the here-document bodies including the ending delimiter,
17 followed by a newline
18 - print_redirection_list: print the heredoc headers the first time
19 through the list of redirections so we print them in the same left-
20 to-right order they're supplied; print the bodies and delimiters with
21 print_heredoc_bodies after we print all the redirections if we're
22 not printing a list of commands (printing_connection == 0). Fix for
23 problem reported by Isabella Parakiss <izaberina@gmail.com>
24 - print_deferred_heredocs: don't print heredoc headers, since they're
25 now printed in print_redirection_list
26 - print_deferred_heredocs: use print_heredoc_bodies
27
28 9/20
29 ----
30 builtins/mapfile.def
31 - readarray: update usage synopsis to include -d delim. Report and
32 fix from jhankins@homewood.k12.al.us
33
34 test.c
35 - test_binop: if op[0] == '-', make sure op[1] != 0 before checking
36 op[2] or op[3]. Fixes out-of-bounds read reported by Franco
37 Costantini <franco.costantini.20@gmail.com>
38
39 parse.y
40 - cond_term: if yylval.word->word[0] == '-' make sure word[1] != 0
41 before checking word[2] and calling test_unop. Fixes out-of-bounds
42 read reported by Franco Costantini <franco.costantini.20@gmail.com>
43 - make sure to check all instances of the return value of the
44 simple_command production before trying to hook redirections onto it,
45 since it can potentially return NULL.
46 Reported by Franco Costantini <franco.costantini.20@gmail.com>
47
48 9/21
49 ----
50 parse.y
51 - token_is_assignment: make sure to check that the return value from
52 assignment() finds the `=' we just added at index I to avoid false
53 positives from g=g=g=g=g=g=(). Reported by Franco Costantini
54 <franco.costantini.20@gmail.com>
55
56 9/22
57 ----
58 parse.y
59 - token_is_assignment: if we're not using the bash malloc (which has
60 guard bytes after the requested allocation size), use a new
61 buffer so we can make sure it's big enough to hold the current
62 token and at least two additional characters. Reported by
63 Franco Costantini <franco.costantini.20@gmail.com>
64
65 9/23
66 ----
67 execute_command.c
68 - execute_in_subshell: call without_job_control for both job control
69 and non-job-control builds to avoid waiting for last_made_pid
70 inherited from parent shell. Related to fix from 8/4 to
71 initialize_subshell. Fixes bug reported by Martijn Dekker
72 <martijn@inlv.org>
73
74 builtins/declare.def
75 - local_builtin: allow `local --help' to work even when not executing
76 a function. Suggestion from Norm Abramovitz <norm@starkandwayne.com>
77
78 9/25
79 ----
80 builtins/printf.def
81 - bexpand: if passed a null or empty string, return a newly-allocated
82 empty string (so the return value can always be freed) instead of
83 NULL.
84 - printstr: if passed a null string, treat it as if it were an empty
85 string so any precision or fieldwidth arguments are handled
86 correctly. Report from isabella parakiss <izaberina@gmail.com>
87
88 subst.c
89 - skip_matched_pair: make the flags argument of 1 affect whether or
90 not backslash can quote characters in the string, so it affects
91 all quoting mechanisms
92
93 arrayfunc.c
94 - unbind_array_element: now takes a third (flags) argument; flags&1
95 means to not expand an associative array index. This is only called
96 from a shell builtin context, which means the argument should have
97 already undergone word expansion, so it should be ok. Will still
98 be a problem for uses like "unset -v 'var[$ind]'", quoted to avoid
99 globbing
100 - valid_array_reference: pass second flags argument to skipsubscript;
101 still set to 0 by all callers
102
103 arrayfunc.h
104 - unbind_array_element: updated prototype
105
106 builtins/set.def
107 - unset_builtin: add third argument of 1 to unbind_array_element calls
108 [TEMPORARILY DISABLED]
109 - unset_builtin: call valid_array_reference with second arg of 1 to
110 handle unmatched pairs of quotes and [/]
111
112 array.c
113 - array_reference: optimize access locality as well as sequential
114 access by adding ability to start from last-accessed element and move
115 backwards or forwards depending on the desired index. Inspired by
116 report from Tom McCurdy <tom.j.mccurdy@gmail.com> and followup from
117 Christian Franke <Christian.Franke@t-online.de>
118
119 variables.c
120 - all_array_variables: include associative arrays, not just indexed
121 arrays. Reported by Grisha Levit <grishalevit@gmail.com>
122
123 execute_cmd.c
124 - execute_disk_command: if we're optimizing out the fork (CMD_NO_FORK),
125 decrement the shell level so we don't end up incrementing it twice.
126 We should decrement the shell level for an implicit exec like an
127 explicit one. Reported by Stephane Chazelas
128 <stephane.chazelas@gmail.com>
129
130 builtins/exec.def
131 - exec_builtin: don't bother to decrement the shell level if we are
132 already in a `(command)' subshell. Reported by Stephane Chazelas
133 <stephane.chazelas@gmail.com>
134
135 lib/readline/macro.c
136 - macro_level: count of macro nesting level, maintained by
137 _rl_push_executing_macro and _rl_pop_executing macro
138 - _rl_with_macro_input: if current nesting level exceeds
139 MAX_MACRO_LEVEL, abort the current command line with _rl_abort_internal
140 and return to the top level. Reported by Christian Klomp
141 <christianklomp@gmail.com>
142
143 lib/readine/history.c
144 - add_history: if allocating the history list for the first time,
145 make sure the max history list size isn't so large that it will
146 cause allocation errors. Cap it at MAX_HISTORY_INITIAL_SIZE
147 (8192). Reported by Sean Zha <freeman_cha@hotmail.com>
148
149 jobs.c
150 - wait_for: if a foreground job with job control enabled is killed by a
151 SIGINT and sourcelevel != 0, act as if we received the SIGINT so the
152 file sourcing can be terminated. Reported by PePa
153 <peterkelly@passchier.net>
154
155 9/26
156 ----
157 subst.c
158 - read_comsub: only warn once for null bytes in command substitution
159 output, instead of once for every null byte
160
161 arrayfunc.c
162 - array_variable_part: now takes a `flags' argument; changed all callers
163 to initially pass 0
164 - array_variable_name: now takes a `flags' argument; changed all callers
165 to initially pass 0
166 - array_variable_name: pass `flags' argument to skipsubscript instead
167 of just passing 0
168
169 arrayfunc.h
170 - array_variable_{name,part}: added new argument to prototypes
171
172 9/29
173 ----
174 bashline.c
175 - bash_directory_completion_hook: don't bother to try and expand a
176 ${ or $( that isn't complete; expand_prompt_string will complain.
177 Fixes reports from John Passaro <john.a.passaro@gmail.com> and
178 Valentin Bajrami <valentin.bajrami@gmail.com>
179
180 lib/readline/history.c
181 - _hs_append_history_line: use a strategy that attempts to avoid
182 realloc copying memory to a newly-allocated block if the history
183 line we're appending to gets `too long' (currently 256 bytes).
184 We reallocate in powers of 2 starting at 512, and rely on realloc
185 not allocating a new block and copying into it if the size is the
186 same as the last call to realloc. Addresses issue raised by
187 Hubert Schmid <h.schmid@gmx.de>
188
189 trap.h
190 - check_signals: new extern declaration
191 - trapped_signal_received: new extern declaration
192
193 builtins/read.def
194 - read_builtin: if one of the zread* functions returns < 0 (which
195 usually only happens in Posix mode), make sure we call check_signals()
196 before eventually calling run_pending_traps() because zread() isn't
197 going to call it
198 - include trap.h for correct extern functions and variable declarations
199
200 lib/sh/zread.c
201 - zread: if executing a builtin, call check_signals_and_traps() for
202 backwards compatibility. If not, call check_signals() only, because
203 we don't want to run traps during, for instance, reading command
204 substitution output. Fixes race condition bug reported by Luiz Angelo
205 Daros de Luca <luizluca@gmail.com>
206
207 9/30
208 ----
209 subst.c
210 - command_substitute: reset parse_and_execute_level to 0 in the child
211 process, since it's independent of the other parse_and_execute
212 calls. Adds command substitution inside other parse_and_execute
213 calls optimizations to suppress forks, as suggested by
214 Martijn Dekker <martijn@inlv.org>
215
216 10/3
217 ----
218 configure.ac
219 - SHOBJ_STATUS: make sure it defaults to unsupported and is substituted
220 if the shobj-conf script isn't run. Fixes `make install' bug with
221 a minimal config reported by Andrew Tomazos <andrewtomazos@gmail.com>
222
223 10/5
224 ----
225 support/shobj-conf
226 - darwin: set compatibility_version for a shared build of the readline
227 library (the standalone readline distribution shares this file) to
228 $(SHLIB_MAJOR)$(SHLIB_MINOR). Recommendation from Max Horn
229 <max@quendi.de>
230
231 10/6
232 ----
233 array.h
234 - array_first_index: new convenience define
235
236 array.c
237 - ADD_AFTER: new define, complement of ADD_BEFORE
238 - UNSET_LASTREF: now takes an array as an argument, prepping for move
239 of lastref pointer into the array struct
240 - array_insert: check whether we are adding at the beginning of the
241 array and take a fast path if so
242 - array_insert: use same strategy as array_reference to find the place
243 to insert, starting from the last-referenced element and moving
244 forward or back from there; use ADD_AFTER if moving backward
245 - array_insert: if replacing an existing element, just replace the
246 value with new->value instead of the entire element
247 - array_reference: short-circuit quickly if looking for an element
248 before the first assigned index
249 - array_reference: if we don't find the element, leave lastref pointing
250 to the closest element under the assumption we will be assigning or
251 looking for something close
252 - array_reference: take advantage of ordered indexes to short-circuit
253 when looking for element that is not set
254
255 10/7
256 ----
257 array.c
258 - array_remove: short-circuit if asked to remove index after max
259 index or before first index
260
261 10/10
262 -----
263 lib/malloc/malloc.c
264 - internal_realloc: if we are requesting reallocation to the same size
265 as the block's current size, short-circuit and return `mem' right
266 after doing bounds check
267 - internal_realloc: if we are reducing the size of an allocation, and
268 the new size fits in the next lower bin, just keep the same block
269 and adjust the size, so we can avoid some copies
270
271 parse.y
272 - set_line_mbstate: keep track of the allocated size of
273 shell_input_line_property, only request reallocation if the size
274 increases, but don't let it get too big
275
276 10/11
277 -----
278 jobs.c
279 - wait_for_background_pids: make sure we wait for pid in
280 last_procsub_child since it's not found in any job -- still needs
281 more work to wait for multiple process substitutions
282
283 subst.c
284 - process_substitute: if make_child fails, make sure we call
285 restore_pipeline to undo the previous save_pipeline()
286
287 10/15
288 -----
289 subst.c
290 - process_substitute,command_substitute: leave subshell_level (reflected
291 as $BASH_SUBSHELL) intact for any exit trap instead of decrementing
292 it. Suggested by Martijn Dekker <martijn@inlv.org>
293
294 builtins/evalstring.c
295 - optimize_subshell_command: new function, framework for optimizing
296 out forks for command that have already forked and are executing
297 in a subshell. Not used yet
298
299 expr.c
300 - readtok: if we have a post-increment or post-decrement, and the
301 previous token is not a string, check whether the previous token is
302 a number that results from a pre-increment or pre-decrement, and
303 make that an error. Report from Conrad Hoffmann <ch@bitfehler.net>
304
305 10/16
306 -----
307 aclocal.m4
308 - BASH_JOB_CONTROL_MISSING: convert from AC_TRY_RUN to AC_TRY_COMPILE
309 with existing set of preprocessor defines, so it can work when
310 cross-compiling. Suggested by Felix Janda <felix.janda@posteo.de>
311
312 10/19
313 -----
314 variables.c
315 - get_bashpid: BASHPID is no longer readonly; assignments to it are
316 just ignored.
317
318 doc/{bash.1,bashref.texi}
319 - BASHPID: note that assignments are ignored and unsetting BASHPID
320 causes it to lose its special properties
321
322 10/28
323 -----
324 builtins/pushd.def
325 - popd_builtin: make sure to check the normalized stack offset
326 (i.e., negatives counting back from the end of the stack) is within
327 bounds before trying to free that stack entry. Report from
328 Fernando Muñoz <fernando@null-life.com>
329
330 lib/readline/histfile.c
331 - chown: protect calls with HAVE_CHOWN. Fixes for MinGW{64,32} from
332 J. Peter Mugaas <jpmugaas@suddenlink.net>
333
334 lib/readline/colors.c
335 - S_ISDIR: add define if missing
336 - S_ISUID, S_ISGID, S_ISLNK, S_ISSOCK: don't use unless defined.
337 Fixes for MinGW{64,32} from J. Peter Mugaas <jpmugaas@suddenlink.net>
338
339 bashhist.c
340 - current_command_line_comment: set to the most recent line in a
341 possibly multi-line command that contains a shell comment; set in
342 maybe_add_history and bash_add_history to either the current
343 command number or -2
344 - maybe_add_history: set current_command_line_comment for first line
345 of command
346 - bash_add_history: chars_to_add set to "\n" if the current command line
347 is one greater than the previous line containing a comment
348 (current_command_line_comment). Fixes complaint from back in
349 January, 2016 from Dave Rutherford <dave@evilpettingzoo.com>
350
351 array.h
352 - lastref: move last-referenced pointer into each array struct, so all
353 arrays can have reference locality
354
355 array.c
356 - array_create: set lastref element to 0
357 - array_copy: if copying the lastref in array a, set the new lastref
358 in the copy to the same element
359 - IS_LASTREF, LASTREF_START, LASTREF, INVALIDATE_LASTREF, SET_LASTREF,
360 UNSET_LASTREF: change to use new array `lastref' member
361
362 pathexp.c
363 - quote_string_for_globbing: if quoting for a regexp, make sure to
364 skip and copy a leading `^' in a bracket expression, and skip and
365 copy a subsequent `]' (after an optional `^'), so that leading
366 bracket doesn't close the bracket expression. Report from
367 Stephane Chazelas <stephane.chazelas@gmail.com>
368
369 10/29
370 -----
371 subst.c
372 - extract_delimited_string: add calls to CHECK_STRING_OVERRUN for
373 $( inside $((, nested OPENERs, nested ALT_OPENERs, and backquotes
374 - skip_to_delim: add calls to CHECK_STRING_OVERRUN for $(, ${,
375 process substitution
376 - extract_dollar_brace_string: add calls to CHECK_STRING_OVERRUN for
377 $(
378 - extract_dollar_brace_string: use skipsubscript to skip over the
379 array subscript in ${var[sub]} (non-quoted case uses string_extract,
380 which already uses skipsubscript). Tagged for bash-5.0
381
382 10/30
383 -----
384 variables.c
385 - EPOCHSECONDS: new dynamic variable, time in seconds since Unix
386 epoch; assignments are ignored. Can be used on systems where
387 strftime() doesn't support '%s'
388 - EPOCHREALTIME: new dynamic variable, time in seconds since Unix
389 epoch with microsecond granularity
390
391 doc/{bash.1,bashref.texi}
392 - EPOCHSECONDS documentation
393 - EPOCHREALTIME documentation
394
395 execute_cmd.c
396 - decpoint: moved to locale.c, renamed locale_decpoint; changed callers
397
398 {bashintl,externs}.h
399 - locale_decpoint: extern declaration or #define if support for
400 localeconv() not there
401
402 10/31
403 -----
404 lib/malloc/malloc.c
405 - posix_memalign: add new posix-mandated interface
406
407 examples/loadables/rm.c
408 - rm: minimal loadable builtin, removes files and directories, only
409 handles -r and -f options. Original from Tim Ruehsen
410 <tim.ruehsen@gmx.de>, heavily rewritten for inclusion as loadable
411
412 examples/loadables/Makefile.in
413 - rm: add rules to build rm as one of the `other' targets
414
415 examples/loadables/stat.c
416 - stat: new loadable builtin that takes a filename and loads the info
417 returned by stat(2) into an associative array specified by the -A
418 argument (default STAT)
419
420 11/1
421 ----
422 variables.c
423 - BASH_ARGV0: new dynamic variable, returns $0 on reference and sets
424 $0 on assignment. From a suggestion from Rocky Bernstein <rocky@gnu.org>
425 a few years ago
426
427 doc/{bash.1,bashref.texi}
428 - BASH_ARGV0: document
429
430 11/2
431 ----
432 lib/glob/sm_loop.c
433 - parse_collsym: make sure to not return an out-of-bounds read if a
434 collating symbol is unterminated. Fixes OOB read reported by
435 Jerzy Kramarz <op7ica@gmail.com>
436 - brackmatch: after incrementing p, before checking whether it's a
437 character range, check whether *p was NULL before the increment
438 and short-circuit the bracket expression if it is
439
440 jobs.c
441 - discard_last_procsub_child: new function, safely discards
442 last_procsub_child and sets it to NULL
443
444 subst.c
445 - process_substitute: call discard_last_procsub_child instead of
446 calling discard_pipeline directly. Fixes bug reported by
447 Christian Weisgerber <naddy@mips.inka.de>
448
449 11/3
450 ----
451 shell.h
452 - EX_DISKFALLBACK: new special return status available to builtins;
453 means to attempt to execute a disk command with the same name as
454 the builtin
455
456 examples/loadables/rm.c
457 - if we see the -i option, return EX_DISKFALLBACK
458
459 execute_cmd.c
460 - execute_simple_command: if executing a builtin returns EX_DISKFALLBACK,
461 try running execute_disk_command instead
462
463 bashline.c
464 - shell_expand_line: use expand_word to expand the readline line
465 buffer, which allows us to pass flags with the word. If a numeric
466 argument is supplied, do not perform quote removal (pass
467 Q_HERE_DOCUMENT since here-doc quoting does the right thing) and
468 do not perform command or process subsitution. From a suggestion
469 by Dabrien 'Dabe' Murphy <dabe@dabe.com> based on an old bug-bash
470 discussion
471
472 subst.c
473 - expand_word_internal: note that we have added a quoted IFS char to
474 istring by setting sentinel has_quoted_ifs. Usually we only add
475 one if we are not going to be performing word splitting, but we
476 will not perform word splitting if there's no expansion, so we need
477 to take care of that case
478 - expand_word_internal: when performing final word split, if there are
479 no expansions but has_quoted_ifs is non-zero, call remove_quoted_ifs()
480 to remove any quoted ifs characters we added while processing
481 - remove_quoted_ifs: new function, removes CTLESC chars preceding
482 (single-byte) chars in IFS. Used when we are not performing word
483 splitting. Fixes bug reported by Martijn Dekker <martijn@inlv.org>
484
485 11/4
486 ----
487 lib/readline/macro.c
488 - _rl_peek_macro_key: return the next character from the current
489 keyboard macro; the next character from the `next' keyboard macro,
490 if there is one, if at the end of the current macro; or 0 to
491 indicate that we are at the end of a keyboard macro sequence
492
493 lib/readline/rlprivate.h
494 - _rl_peek_macro_key: extern declaration
495
496 lib/readline/readline.c
497 - _rl_dispatch_subseq: add test for ESC at the end of a keyboard macro,
498 which should cause the keyboard timeout for ESC to kick in. The
499 previous test didn't run the timeout code if executing from a macro,
500 even if we had read the last character of the macro. Fixes bug
501 reported by Clark Wang <clarkw@vmware.com>
502
503 lib/glob/sm_loop.c
504 - GMATCH: allow trailing backslash in pattern to explicitly match a
505 backslash that is the last character in the string. Bug report from
506 Stephane Chazelas <stephane.chazelas@gmail.com>
507
508 11/5
509 ----
510 builtins/common.c
511 - display_signal_list: if displaying a signal name corresponding to an
512 exit status > 128, don't display the SIG prefix at all. Old code
513 made displaying the SIG prefix dependent on JOB_CONTROL define.
514 Report and fix from Martijn Dekker <martijn@inlv.org>
515
516 execute_cmd.c
517 - execute_subshell_builtin_or_function: call without_job_control even
518 if JOB_CONTROL is not defined. Similar to fix from 9/23.
519 Report from Martijn Dekker <martijn@inlv.org>
520
521 execute_cmd.c
522 - execute_simple_command: free memory allocated and passed to
523 make_child in the child process if JOB_CONTROL is defined
524 - execute_command_internal: free memory allocated and passed to
525 make_child in the child process created to run a () subshell or a
526 compound command within a pipeline if JOB_CONTROL is defined
527 - execute_coproc: free memory allocated and passed to make_child in
528 the child process if JOB_CONTROL is defined
529 - execute_disk_command: free memory allocated and passed to
530 make_child in the child process if JOB_CONTROL is defined. This
531 series of fixes is the result of reports from
532 Eduardo A. Bustamante López <dualbus@gmail.com>
533
534 11/6
535 ----
536 lib/sh/unicode.c
537 - u32toutf16: fix to prevent outputting broken surrogate pairs for
538 Japanese locales (ja_JP.UTF-8) on cygwin (which uses UTF-16 natively).
539 Report and fix from Koichi MURASE <myoga.murase@gmail.com>
540
541 builtins/trap.def
542 - trap_builtin: if OP is `-' (revert), set the SIGINT signal handler
543 to sigint_sighandler if the shell is interactive and sourcing a
544 file (interactive_shell && sourcelevel) or running a trap
545 (interactive_shell && running_trap) even if it's not currently
546 interactive. Report from Martijn Dekker <martijn@inlv.org>
547
548 builtins/read.def
549 - check for and read multibyte characters in all cases, not just when
550 we are reading a specific number of characters, as long as
551 mb_cur_max > 1
552
553 subst.c
554 - expand_word_internal: some improvements to code that converts istring
555 into a WORD_LIST * to avoid multiple allocations and copies of
556 istring, which is already malloc'ed memory -- reduce number of malloc
557 and free calls
558
559 test.c
560 - unary_test: make sure if we test -v array[@] or array[*] that we
561 free the return value from array_value
562
563 11/8
564 ----
565 expr.c
566 - expcond: make sure to set `noeval' before reading tokens depending on
567 the result of the conditional test, since readtok() can evaluate
568 identifiers (and recursively those containing expressions). Report
569 and fix from Koichi MURASE <myoga.murase@gmail.com>
570
571 builtins/evalstring.c
572 - should_suppress_fork: make sure to check for traps on EXIT and
573 ERR, since any_signals_trapped() only checks for `real' signals,
574 not the fake shell ones. Fixes bug reported by Werner Fink
575 <werner@suse.de>
576 - optimize_subshell_command: ditto
577
578 11/9
579 ----
580 eval.c
581 - reader_loop: change so that we don't reset the SIGINT handler every
582 time through the command loop in an interactive shell if the signal
583 is trapped (as the comment noted). Reported by Report from Martijn
584 Dekker <martijn@inlv.org>
585
586 subst.c
587 - parameter_brace_{patsub,remove_pattern,transform,casemod}: save and
588 restore this_command_name while temporarily setting it for use in
589 error messages. Fixes use-after-free error reported by
590 Jerzy Kramarz <op7ica@gmail.com>
591 - string_extract_verbatim: make sure when we increment i by 2 due to
592 a CTLESC or CTLESC-CTLNUL that we don't read past the end of the
593 string. This can happen if the string ends with an odd number of
594 CTLESC chars. Fixes oob-read error reported by
595 Jerzy Kramarz <op7ica@gmail.com>
596
597 11/11
598 -----
599 configure.ac,aclocal.m4
600 - BASH_FUNC_SBRK: make sure sbrk actually works, instead of being just
601 a stub function like on several Linux distributions
602
603 lib/malloc/malloc.c
604 - malloc_usable_size: return the maximum number of bytes available for
605 a particular memory allocation (size of block allocated for it)
606
607 11/12
608 -----
609 configure.ac
610 - changes to make --enable-profiling work on Linux (-pg, no static link,
611 no -static in LDFLAGS)
612
613 Makefile.in
614 - changes to make --enable-profiling work on Linux (take
615 ${PROFILE_FLAGS} out of BASE_CCFLAGS, add to CCFLAGS instead; add
616 BASE_LDFLAGS define that doesn't include -pg or -static; use
617 BASE_LDFLAGS in LDFLAGS; move ${PROFILE_FLAGS} and ${STATIC_LD} to
618 LDFLAGS)
619
620 tests/run-gprof
621 - changes to make profiling test suite with gprof work on Linux (set
622 GMON_OUT_PREFIX to handle multiple profiled processes per test;
623 change default filename to gmon.out from bash.gmon; look for
624 gprof output files in ${TMPDIR} instead of /tmp; handle multiple
625 profiling files starting with $GMON_OUT_PREFIX)
626
627 locale.c
628 - locale_isutf8: use locale_charset() if it's available and nl_langinfo
629 isn't
630 - locale_isutf8: add code to parse a locale specification and determine
631 whether the encoding is UTF-8 (or utf8) in the absence of
632 nl_langinfo and locale_charset
633 - set_default_locale: make sure to set locale_utf8locale early on
634 - locale_utf8locale: set via call to locale_isutf8 wherever LANG,
635 LC_ALL, or LC_CTYPE is set
636
637 11/13
638 -----
639 lib/readline/display.c
640 - rl_redisplay: handle report of potential integer overflow in
641 horizontal display mode from Mateusz Lenik <mlen@mlen.pl>
642
643 lib/sh/mbschr.c
644 - mbschr: if in a UTF-8 locale (locale_utf8locale) and we are looking
645 for an ASCII character, use (essentially) strchr as a shortcut
646
647 lib/sh/shmbchar.c
648 - utf8_{mbstrlen,mblen,mbsmbchar,mbsnlen}: UTF-8-specific replacement
649 functions (should also be able to use utf8_mblen in subst.c:
650 string_extract_verbatim)
651 - mbsmbchar: if locale_utf8locale is true, call utf8_mbsmbchar
652 - mbsmbchar: in UTF-8 locale, use utf8_mblen instead of mbrlen (not
653 used if earlier shortcut taken)
654
655 lib/sh/unicode.c
656 - u32cconv: don't use nl_langinfo early to call u32toutf8()
657 - u32cconv: use locale_utf8locale to set utf8locale
658 - u32cconv: when initializing (u32init == 0), use locale_charset, then
659 nl_langinfo, then stub_charset to determine the charset
660 - u32cconv: even if we don't have iconv, if locale_utf8locale is non-
661 zero, return u32toutf8
662
663 11/15
664 -----
665 lib/readline/nls.c
666 - _rl_init_locale: new function, split off code that determines current
667 locale from _rl_init_eightbit, use it to set _rl_utf8locale
668
669 lib/readiline/rlprivate.h
670 - _rl_init_locale: new extern declaration
671
672 lib/readline/readline.c
673 - rl_initialize: if not initializing everything the first time, call
674 _rl_init_locale to check current locale and set _rl_utf8locale
675
676 lib/readline/text.c
677 - _rl_insert_char: optimize cases where we are inserting a single-byte
678 character in a locale with multibyte characters
679 - _rl_insert_char: check whether character is single byte if we know
680 we are in a UTF-8 locale, optimize single-byte case to avoid calls
681 to mbrtowc and memmove/memcpy
682
683 lib/readline/mbutil.c
684 - _rl_char_value: if we are in a UTF-8 locale (_rl_utf8locale) and the
685 current character does not have the eighth bit set ((c & 0x80) == 0),
686 return that char without bothering to call mbrtowc
687 - _rl_adjust_point: don't bother calling mbrlen if we are in a UTF-8
688 locale and the current character is not a multibyte character
689 - _rl_find_next_mbchar_internal: if we are in a UTF-8 locale, use that
690 to avoid calls to mbrtowc
691
692 lib/readline/display.c
693 - _rl_col_width: if in a UTF-8 locale, take advantage of that to avoid
694 calls to mbrlen and mbrtowc
695 - rl_redisplay: if in a UTF-8 locale, take advantage of that to avoid
696 calls to mbrtowc
697
698 11/17
699 -----
700 lib/readline/histlib.h
701 - PATTERN_SEARCH: new flag for history search interfaces, means to
702 search for a pattern as Posix specifies
703
704 lib/readline/histsearch.c
705 - history_search_internal: now takes a `flags' argument instead of just
706 an `anchored' argument to accommodate PATTERN_SEARCH
707 - _hs_history_patsearch: new internal interface to use when flags
708 specify PATTERN_SEARCH
709
710 lib/readline/rlprivate.h
711 - SF_PATTERN: new flag for non-incremental search contexts, means to
712 treat search string as a pattern (maps to PATTERN_SEARCH)
713
714 lib/readline/search.c
715 - noninc_dosearch: takes an additional `flags' argument for SF_PATTERN
716 - noninc_search_from_pos: takes an additional `flags' argument for
717 SF_PATTERN
718 - noninc_dosearch: pass flags argument through to noninc_search_from_pos
719 - _rl_nsearch_init: if we are in vi command mode, and `pchar' (key used
720 to invoke the search) is `?' or `/', add SF_PATTERN to the flags
721 to conform to Posix spec for vi-mode editing
722 - _rl_nsearch_dosearch: if cxt->sflags indicates that we should do a
723 pattern search, pass SF_PATTERN to noninc_search_from_pos
724 - rl_noninc_forward_search_again: if in vi command mode and key == `N',
725 make sure flags arg passed to noninc_dosearch includes SF_PATTERN
726 - rl_noninc_reverse_search_again: if in vi command mode and key == `n',
727 make sure flags arg passed to noninc_dosearch includes SF_PATTERN
728 - rl_history_search_internal: pass extra flags arg to noninc_search_from_pos
729
730 11/18
731 -----
732 lib/readline/search.c
733 - noninc_search_from_pos: takes a new argument, a pointer to int where
734 it stores the offset of the match in the history line (if non-NULL),
735 modified callers
736 - rl_history_search_internal: pass newcol pointer to
737 noninc_search_from_pos to avoid having to recompute the match offset
738 in the matching history entry
739
740 config.h.in
741 - define HAVE_FNMATCH if we have the fnmatch function (configure was
742 already checking for it)
743
744 lib/readline/histsearch.c
745 - _hs_history_patsearch: transform the pattern into one ending in a
746 `*' to avoid having to perform multiple match attempts from each
747 index in the history line
748 - history_search_internal: changes to handle pattern matching if
749 PATTERN_SEARCH is in the flags and HAVE_FNMATCH is defined. This
750 makes vi-mode history searching treat the user-specified search
751 string as an fnmatch pattern, as Posix requires. Fixes issue
752 reported by <jwdevel@gmail.com>
753
754 11/19
755 -----
756 builtins/shopt.def
757 - shopt_enable_hostname_completion: only declare this if READLINE
758 defined, since that's the only time it's used. Reported by
759 isabella parakiss <izaberina@gmail.com>
760
761 11/20
762 -----
763 builtins/common.c
764 - display_signal_list: make `kill -l 0' print `EXIT', modifying change
765 from 9/17
766
767 11/21
768 -----
769 subst.c
770 - expand_word_internal: when the shell encounters a backslash as the
771 last character of the string, don't try to add a '\'0' to the end
772 of the string if the string is quoted, just add a <CTLESC><\> and
773 skip to the end of string processing. Fixes oob-read error
774 reported by Jerzy Kramarz <op7ica@gmail.com>
775
776 test.c
777 - two_arguments: check argv[pos][1] before checking argv[pos][2] when
778 looking for a unary argument. Fixes oob-read error on single `-'
779 in unary operator position reported by Jerzy Kramarz
780 <op7ica@gmail.com>
781 - ANDOR: check s[1] before checking s[2] in case s[1] == end of string.
782 Fixes oob-read error reported by Jerzy Kramarz <op7ica@gmail.com>
783
784 subst.c
785 - command_substitute: now takes additional flags argument, changed one
786 caller (param_expand) to pass through PF_ASSIGNRHS flag; other callers
787 pass 0
788 - command_substitute: pass through flags argument to read_comsub
789 - read_comsub: now takes additional new flags argument to indicate
790 whether or not the word is in a context where word splitting will
791 eventually be performed
792 - read_comsub: if we are running in a context where word splitting
793 will not take place (PF_ASSIGNRHS), we read a CTLESC, and CTLESC is
794 in $IFS, add a CTLESC to make sure it gets through a round of
795 dequoting
796
797 11/23
798 -----
799 parse.y
800 - xparse_dolparen: since reset_parser frees the pushed string list,
801 and this is supposed to be a separate parsing context, we need to
802 save and restore pushed_string_list around the call to parse_string
803 and reset_parser. Fixes bug reported by Dan Douglas
804 <ormaaj@gmail.com>
805
806 bashhist.h
807 - HISTEXPAND_DEFAULT: default value of history_expansion, moved here
808 from flags.c
809
810 flags.[ch]
811 - histexp_flag: new variable, this is what set -H/set -o histexpand
812 sets; history_expansion set to value of this variable; defaults to 0
813 - history_expansion: now set to HISTEXPAND_DEFAULT
814
815 bashhist.c
816 - bash_history_reinit: if interact == 0, set history_expansion to the
817 value of histexp_flag, to allow -H option to enable history
818 expansion
819 - bash_history_reinit: if interact == 0, make sure
820 history_expansion_inhibited is set opposite of histexp_flag, so
821 enabling history expansion with -H invocation option turns off
822 inhibited expansion. If interactive shell, we turn it off so
823 history_expansion controls whether or not history expansion takes
824 place. In practice, this function is always called with interact == 0,
825 and -c command still doesn't perform history expansion
826
827 shell.c
828 - init_interactive: make sure histexp_flag and history_expansion are
829 identical in an interactive shell; allows both -H/+H option and
830 default compilation options (HISTEXPAND_DEFAULT) to work
831
832 11/24
833 -----
834 subst.c
835 - get_word_from_string: take advantage of the fact that SEPARATORS is
836 always a (possibly local) copy of IFS, so build a local charmap of
837 separators and use it instead of the (cached and possibly stale)
838 ifs_cmap map and isifs macro. Fixes bug with -N stripping leading
839 whitespace reported by Clark Wang <clarkw@vmware.com>
840
841 11/25
842 -----
843 builtins/read.def
844 - read_builtin: make `i' volatile, since auto variables are technically
845 undefined after a longjmp, and a timeout on SIGALRM causes one.
846 Fix suggested by Dmitry Goncharov <dgoncharov@users.sf.net>
847
848 11/27
849 -----
850 parse.y
851 - shell_getc: if we are reading input from a string, and we get the
852 ending '\0', and we are not expanding an alias, return EOF right
853 away. It might be an eval'ed string that has a syntax error.
854 Fixes bug reported by Dan Douglas <ormaaj@gmail.com>
855
856 11/28
857 -----
858 subst.c
859 - expand_word_internal: if we're expanding a quoted string containing
860 a tilde as the first character of a word, only expand the tilde if
861 we're expanding an array subscript (Q_ARRAYSUB), not if we're
862 expanding any arithmetic expression (Q_ARITH). This fixes a
863 backwards compatibility issue with expressions like ~0 reported by
864 Bize Ma <binaryzebra@gmail.com>
865
866 subst.c
867 - parameter_brace_expand_indir: if the variable is not special and
868 the indirect variable is unset (!variable where variable is unset),
869 report an error. This is a slight incompatibility with previous
870 versions, which did not differentiate between indirecting an unset
871 variable and an indirect expansion resulting in an unset variable.
872 Fixes omission reported by otenba@protonmail.com
873
874 11/30
875 -----
876 lib/readline/doc/{rluser.texi,readline.3},doc/bash.1
877 - do-uppercase-version: since this doesn't actually exist, replace it
878 with do-lowercase-version, with the caveat that do-lowercase-version
879 results in undefined behavior if bound to a character that's
880 already lowercase. Suggested by Branden Robinson
881 <g.branden.robinson@gmail.com>
882
883 lib/readline/doc/rluser.texi
884 - history-substring-search-forward: was misspelled as "substr-search";
885 ditto for search-backward
886
887 doc/bash.1
888 - history-substring-search-{backward,forward}: add documentation, text
889 straight from readline.3
890
891 jobs.c
892 - initialize_job_control: if the terminal's process group is valid,
893 but the shell is not the foreground process, check for terminating
894 signals (like SIGHUP, which the kernel would send if the process
895 group were orphaned) during the loop where we try to stop the shell
896 if it's not in the foreground. Not a perfect solution; the kernel
897 might not send SIGHUP
898
899 12/1
900 ----
901 jobs.c
902 - initialize_job_control: only go through the SIGTTIN loop 16 times at
903 most before deciding we're in the background and probably a member of
904 an orphaned process group; set original_pgrp to the terminal's pgrp
905 (so the eventual give_terminal_to doesn't leave the terminal in the
906 wrong pgrp); and bail on job control initialization
907
908 tests/run-all
909 - unset SHELLOPTS to avoid its options `polluting' the test
910 environment. Suggestion from Vladimir Marek
911 <Vladimir.Marek@oracle.com>
912
913 tests/execscript
914 - use $PWD/exec8.sub to protect against someone who has a cd command
915 in his bashrc. Report from Vladimir Marek
916 <Vladimir.Marek@oracle.com>
917
918 12/2
919 ----
920 shell.c
921 - open_shell_script: call end_job_control before exiting the shell in
922 case we were run as `bash -i script' and there is a problem with
923 executing `script'. If we don't, the terminal ends up in the wrong
924 process group. Fix from Clark Wang <clarkw@vmware.com>
925
926 12/3
927 ----
928 parse.y
929 - read_comsub: if we look for a character following a `<' and it's
930 not `<' (indicating that we don't have to read a here-document),
931 make sure we push that character back and go through the loop again
932 so we note the right word start location. Fixes bug reported by
933 parasite parasite <42parasite@gmail.com>
934
935 subst.c
936 - parameter_brace_expand_indir: clean up checks for unset variables to
937 minimize incompatibilities with previous versions
938
939 12/5
940 ----
941 lib/readline/history.c
942 - add_history: don't update history_length until all of the updates to
943 the_history are complete, so history_length is always consistent.
944 Report and fix from Hong Cho <hong.cho@citrix.com>
945
946 bashline.c
947 - bash_backward_shellword: fix to work better at the end of the line,
948 with multiple trailing whitespace characters. Inspired by report
949 from Kirill Timofeev <kt97679@gmail.com>
950
951 Makefile.in
952 - bashbug: use `^' as the sed delimiter instead of `%'; some compilers
953 use `%' in CFLAGS. Report from Vladimir Marek
954 <Vladimir.Marek@oracle.com>
955
956 12/6
957 ----
958 test.c
959 - test_unop: make sure op[1] != 0 before testing op[2]
960 - term: make sure argv[pos][1] != 0 before testing argv[pos][2]. Fixes
961 oob-read reported by Jerzy Kramarz <op7ica@gmail.com>
962
963 12/7
964 ----
965 lib/glob/glob.c
966 - glob_filename: assign the return value of realloc (results, ...) to
967 a temp pointer, so if realloc returns NULL, we make sure we free
968 results. Report from Kirill Timofeev <kt97679@gmail.com>
969
970 12/12
971 -----
972 lib/sh/shquote.c
973 - sh_backslash_quote: if FLAGS&2, backslash-quote other single-byte
974 characters that are in the current locale's <blank> character class
975
976 builtins/printf.def
977 - printf_builtin: when processing the `%q' format, make sure to
978 backslash quote all <blank> characters by making sure that FLAGS
979 passed to sh_backslash_quote includes 2. Fixes issue for certain
980 iso-8859-1 locales where character 160 (octal 240, hex 0xa0) is a
981 non-breaking space. Report from Stephane Chazelas
982 <stephane.chazelas@gmail.com>
983
984 lib/sh/eaccess.c
985 - sh_stat: if DEV_FD_STAT_BROKEN is defined, take /dev/fd/N and turn
986 it into a stat on file descriptor N, as if /dev/fd were not
987 available. This is the case on some old versions of SunOS. Report
988 and patch from Dmitry Goncharov <dgoncharov@users.sf.net>
989
990 config.h.in
991 - DEV_FD_STAT_BROKEN: add define
992
993 configure.ac
994 - --enable-dev-fd-stat-broken: new command-line option, defines
995 DEV_FD_STAT_BROKEN if supplied at configure time
996
997 doc/bashref.texi
998 - --enable-dev-fd-stat-broken: document new command-line option for
999 configure
1000
1001 arrayfunc.c
1002 - assoc_expand_once: new variable, declared here just because
1003
1004 arrayfunc.h
1005 - assoc_expand_once: extern declaration
1006 - AV_NOEXPAND: new flag value for the array_value family of functions:
1007 means to not run associative array subscripts through word expansion
1008
1009 builtins/set.def
1010 - unset_builtin: call unbind_array_element with assoc_expand_once as
1011 third arg, controls whether we expand associative array subscripts
1012 (if 1, we suppress the usual expansion). With accompanying shopt,
1013 provides backwards compatible option to solve problem with quotes
1014 and other characters in associative array subscripts pointed out
1015 most recently by Mingye Wang (Arthur2e5) <arthur200126@gmail.com>
1016
1017 builtins/shopt.def
1018 - assoc_expand_once: new option, controls value of internal variable
1019 with the same name. Currently undocumented because I'm not completely
1020 sold on the name
1021
1022 expr.c
1023 - evalexp: now takes a second argument, flags. Changed all callers in
1024 multiple other files (builtins/let.def,execute_cmd.c,arrayfunc.c,
1025 subst.c,test.c,variables.c)
1026
1027 externs.h
1028 - EXP_EXPANDED, new flag for second argument to evalexp
1029
1030 builtins/let.def
1031 - let_builtin: add EXP_EXPANDED to flags passed to evalexp
1032
1033 execute_cmd.c
1034 - execute_arith_command: add EXP_EXPANDED to flags passed to evalexp,
1035 since the command string is run through expand_words_no_vars before
1036 being evaluated
1037
1038 expr.c
1039 - set expression-global variable already_expanded if flags arg to
1040 evalexp contains EXP_EXPANDED
1041 - if assoc_expand_once option set and already_expanded flag set, pass
1042 1 in flags to array_variable_part to skip over quotes and expansions
1043 in the subscript
1044 - if those two variables set, pass AV_NOEXPAND as flag to
1045 get_array_value to prevent word expansions on the subscript
1046
1047 arrayfunc.c
1048 - if flags passed to unbind_array_element includes 1, pass flag on to
1049 skipsubscript so we don't expect matched quotes or process
1050 expansions in the subscript
1051 - if flags to array_value_internal include AV_NOEXPAND, pass 1 as flag
1052 to array_variable_part to pass along to skipsubscript
1053 - if flags to array_value_internal include AV_NOEXPAND, don't call
1054 expand_assignment_string_to_string; just use the unexpanded subscript
1055 to produce the key [THIS IS A WORK IN PROGRESS]
1056
1057 12/14
1058 -----
1059 subst.h
1060 - ASS_NOEXPAND: assignment flag that inhibits expansion of associative
1061 array subscripts
1062
1063 variables.c
1064 - bind_int_variable: takes new flags arg; flags are taken from the
1065 ASS_ set of assignment flags, changed callers (bashline.c, expr.c,
1066 pcomplete.c)
1067 - bind_int_variable: if flags includes ASS_NOEXPAND, pass 1 as flag to
1068 valid_array_reference and array_variable_part to pass along to
1069 skipsubscript, so we don't try to skip over quoted strings in the
1070 subscript
1071 - bind_int_variable: pass flags along to assign_array_element
1072
1073 variables.h
1074 - bind_int_variable: updated extern declaration with new flags arg
1075
1076 expr.c
1077 - expr_bind_variable: if the assoc_expand_once option is enabled, and
1078 the flags to evalexp indicate that we have already run the expression
1079 through word expansion, pass ASS_NOEXPAND as flag to bind_int_variable
1080
1081 arrayfunc.c
1082 - assign_array_element: if flags includes ASS_NOEXPAND, pass 1 as flag
1083 to array_variable_name to pass along to skipsubscript
1084 - assign_array_element: if flags includes ASS_NOEXPAND, don't run an
1085 associative array subscript through word expansion, just use as-is
1086
1087 subst.c
1088 - param_expand: call evalexp with EXP_EXPANDED flag for arithmetic
1089 substitution because the string has already been expanded with
1090 expand_arith_string
1091
1092 12/15
1093 -----
1094 builtins/read.def
1095 - read_builtin: use value of assoc_expand_once for valid_array_reference
1096 as with other uses
1097 - bind_read_variable: if assoc_expand_once is set, pass ASS_NOEXPAND
1098 to assign_array_element
1099
1100 general.c
1101 - assignment: instead of checking whether flags == 0 to allow a `[',
1102 explicitly check for (flags&1) to disallow it. This leaves the door
1103 open for additional flag values
1104
1105 builtins/printf.def
1106 - printf_builtin: use value of assoc_expand_once for
1107 valid_array_reference as with other uses
1108 - bind_printf_variable: if assoc_expand_once is set, pass ASS_NOEXPAND
1109 to assign_array_element
1110
1111 12/16
1112 -----
1113 builtins/history.def
1114 - change history -d option to handle negative arguments; negative
1115 arguments offset from the end of the history list (last_position + 1
1116 so history -d -1 deletes the history -d command that just got
1117 added). Original patch from Piotr Grzybowski <narsil.pl@gmail.com>
1118
1119 doc/bash.1,lib/readline/doc/hsuser.texi
1120 - documented new behavior of negative offsets for `history -d'
1121
1122 12/17
1123 -----
1124 lib/readline/history.c
1125 - remove_history: use memmove to move the history list around instead
1126 of a loop that copies pointers one at a time, similar to add_history
1127
1128 12/19
1129 -----
1130 configure.ac
1131 - linux: make sure PGRP_PIPE is defined unconditionally for all kernel
1132 versions greater than 2.3.*
1133
1134 lib/readline/history.c
1135 - clear_history: when clearing the history, reset history_base to 1
1136 (its default)
1137 - remove_history_range: new function, removes a set of history entries
1138 and returns them all for deallocation
1139
1140 lib/readline/history.h
1141 - remove_history_range: extern declaration
1142
1143 12/20
1144 -----
1145 execute_cmd.c
1146 - eval_arith_for_expr: pass EXP_EXPANDED to evalexp, since we run the
1147 expression through expand_words_no_vars
1148
1149 12/21
1150 -----
1151 input.c
1152 - b_fill_buffer: when read returns EOF or error, and we reset the
1153 buffer and pointers, reset the input pointer to 0. Fixes issue
1154 reported by Stephane Chazelas <stephane.chazelas@gmail.com>
1155
1156 12/22
1157 -----
1158 arrayfunc.[ch],subst.c
1159 - array_expand_index: added new FLAGS argument, reserved for future use,
1160 changed callers
1161
1162
1163 12/24
1164 -----
1165 variables.c
1166 - can_optimize_assignment,optimized_assignment: see if we can detect
1167 whether or not we're trying to append a string to a string variable,
1168 and optimize that using realloc/strcpy. Based on a log-ago
1169 suggestion from Aharon Robbins <arnold@skeeve.com>
1170
1171 12/27
1172 -----
1173 builtins/help.def
1174 - help_builtin: don't pass return value from ngettext() directly to
1175 printf
1176
1177 12/28
1178 -----
1179 sig.c
1180 - set_signal_handler: set SA_RESTART for SIGWINCH, so window size
1181 changes don't interrupt open/read/write. Suggested by
1182 Andriy Prystupa <andriy.prystupa@globallogic.com> back in 10/2016
1183
1184 12/30
1185 -----
1186 execute_cmd.c
1187 - coproc_pidchk: if MULTIPLE_COPROCS, call cpl_search to find coproc
1188 associated with pid, don't remove it from the list with cpl_delete.
1189 Just mark as dead and wait for coproc_reap/cpl_reap to take care
1190 of disposing it
1191 - execute_coproc: NEW FEATURE: run the coproc name through word
1192 expansion before creating the coproc; this allows unique coprocs
1193 to be created in loops. Originally requested way back in 2012 by
1194 Erik Brandsberg <ebrandsberg@juniper.net>
1195
1196 command.h
1197 - subshell_com: now has a line number member: line
1198
1199 make_cmd.c
1200 - make_subshell_command: assign current line number (line number of the
1201 ending right paren) to `line' member
1202
1203 copy_cmd.c
1204 - copy_subshell_command: copy the `line' member
1205
1206 execute_command.c
1207 - execute_command_internal: when executing a user subshell (`(command)'),
1208 set the line number and line number for the ERR trap from the line
1209 number saved in the subshell command struct. Fix from
1210 Eduardo A. Bustamante López <dualbus@gmail.com>
1211 - execute_arith_command: set line number for ERR trap from line number
1212 saved in the arith command struct. Fix from
1213 Eduardo A. Bustamante López <dualbus@gmail.com>
1214 - execute_cond_command: set line number for ERR trap from line number
1215 saved in the cond command struct. Fix from
1216 Eduardo A. Bustamante López <dualbus@gmail.com>
1217
1218 variables.c
1219 - bind_variable_internal: move can_optimize_assignment call to the
1220 right place
1221
1222 12/31
1223 -----
1224 variables.c
1225 - find_variable_nameref: treat a circular variable reference as
1226 referring to a variable of that name in the global scope (for now),
1227 if one exists. PROVISIONAL change: inspired by suggestion back in
1228 6/2016 by Grisha Levit <grishalevit@gmail.com>
1229
1230 1/2/2017
1231 --------
1232 {expr,general,hashcmd}.c
1233 - include flags.h for flag values
1234
1235 make_cmd.c
1236 - include shell.h instead of the files it includes
1237
1238 flags.h
1239 - new extern declarations for want_pending_command, read_from_stdin
1240
1241 subst.h
1242 - add extern declaration for expanding_redir, assigning_in_environment
1243
1244 trap.h
1245 - add extern declaration for running_trap
1246
1247 execute_cmd.h
1248 - added extern declarations for variables declared in execute_cmd.c,
1249 changed files that declare lots of extern variables
1250
1251 shell.h
1252 - added extern declarations for variables declared in shell.c,
1253 changed files that declare lots of extern variables
1254
1255 parser.h
1256 - added extern declarations for variables declared in parse.y,
1257 changed files that declare lots of extern variables
1258
1259 [lots of changes to reduce the number of extern declarations in C and DEF files]
1260
1261 parse.y
1262 - xparse_dolparen: need ALIAS or DPAREN_ARITHMETIC to be defined to
1263 use STRING_SAVER
1264
1265 1/3
1266 ---
1267 sig.c
1268 - termsig_handler: don't call end_job_control if subshell_environment
1269 indicates that we're in a command or process substitution.
1270 Provisional fix for bug reported by Russell King <rmk@armlinux.org.uk>
1271
1272 jobs.c
1273 - end_job_control: only attempt to give the terminal back to
1274 original_pgrp if job_control != 0; don't test interactive_shell
1275
1276 execute_cmd.c
1277 - execute_disk_command: call QUIT after search_for_command, since
1278 the only time QUIT gets called is when the path is actually
1279 searched. It doesn't happen for an absolute pathname. Fix for
1280 bug reported by Russell King <rmk@armlinux.org.uk>
1281
1282 1/16
1283 ----
1284 lib/glob/glob.c
1285 - extglob_skipname,wextglob_skipname: if we don't find a reason to
1286 not skip the name in any subpattern (r returns 0 for any subpattern),
1287 return 1 because we should skip the name
1288 - extglob_skipname,wextglob_skipname: if we don't find a reason to
1289 not skip the name in any subpattern, but the first part of the extglob
1290 pattern is a wildcard (`*(pat)'), check the rest of the pattern, if
1291 any, to decide whether or not to skip the name. Fixes bug reported
1292 by Grisha Levit <grishalevit@gmail.com>
1293
1294 lib/glob/glob_loop.c
1295 - CHAR -> GCHAR (unsigned char); change uses of CHAR to GCHAR
1296
1297 lib/glob/glob.c
1298 - wchkname -> wskipname
1299 - wskipname: now takes a third `flags' argument, like the other variants
1300 of skipname
1301
1302 1/17
1303 ----
1304 redir.c
1305 - here_document_to_fd: set the file descriptor open for writing to the
1306 here document to be close-on-exec. Fixes bug reported by
1307 Siteshwar Vashisht <svashisht@redhat.com>
1308
1309 1/18
1310 ----
1311 {gmisc,gm_loop}.c
1312 - match_pattern_char,match_pattern_wchar: moved to gm_loop.c (new file),
1313 compile twice for single and wide characters as with the rest of
1314 the functions
1315 - umatchlen,wmatchlen: ditto
1316 - extglob_pattern_p: move to gm_loop.c, generalize for regular and
1317 wide-char versions
1318
1319 1/19
1320 ----
1321 lib/readline/complete.c
1322 - stat_char: fix small memory leak if stat/lstat returns -1
1323
1324 bashline.c
1325 - bash_filename_stat_hook,bash_directory_completion_hook: make sure
1326 expand_prompt_string is caled wth W_NOPROCSUB flag
1327 - directory_exists: don't dequote the filename passed as an argument;
1328 this function should never get quoted pathnames
1329
1330 subst.c
1331 - expand_word_internal: when calling expand_word_internal recursively
1332 after reading a double-quoted string, make sure the W_NOCOMSUB and
1333 W_NOPROCSUB flags make it to the recursive invocation. Fixes bug
1334 reported by Jens Heyens <jens.heyens@cispa.saarland>
1335
1336 1/23
1337 ----
1338 lib/readline/signals.c
1339 - _rl_orig_sigset: original signal mask, set and restored by
1340 rl_set_signals (rl_clear_signals doesn't block signals). If we
1341 are not installing signal handlers, just save signal mask each
1342 time rl_set_signals is called
1343
1344 lib/readline/input.c
1345 - rl_getc: use _rl_orig_sigmask in the call to pselect(), so we block
1346 the set of signals originally blocked by the calling application.
1347 Fixes bug reported by Frédéric Brière <fbriere@fbriere.net>
1348
1349 parse.y
1350 - yy_readline_get: try to unset NONBLOCK mode on readline's input
1351 file descriptor before calling readline(). Inspired by report from
1352 Siteshwar Vashisht <svashisht@redhat.com>
1353
1354 1/30
1355 ----
1356 parse.y
1357 - parse_comsub: don't unconditionally set the LEX_WASDOL flag when we
1358 see a `$'; we should toggle it to accommodate things like $$.
1359 Fixes bug reported by Christian Weisgerber <naddy@mips.inka.de>
1360 - parse_matched_pair: do the same thing with LEX_WASDOL
1361
1362 2/1
1363 ---
1364 jobs.h
1365 - JWAIT_PERROR,JWAIT_FORCE: new defines for the wait_for_ family of
1366 functions
1367
1368 jobs.c
1369 - wait_for_job, wait_for_any_job: take new flags argument for use by
1370 the wait builtin
1371 - wait_for_job: if JWAIT_FORCE flag supplied, loop waiting for job to
1372 terminate instead of change state
1373 - wait_for_single_pid: if JWAIT_FORCE flag supplied, loop waiting for
1374 child process to terminate instead of change state
1375
1376 builtins/wait.def
1377 - takes a new `-f' option, signifying to wait until the specified job
1378 or process terminates, instead of changes state
1379
1380 doc/{bash.1,bashref.texi}
1381 - wait: document the new -f option and its behavior when job control
1382 is enabled
1383 - job control: add a paragraph describing how the wait builtin changes
1384 behavior when job control is enabled: it returns when a job changes
1385 state
1386
1387 2/2
1388 ---
1389 examples/loadables/fdflags.c
1390 - fdflags: new loadable builtin to set and unset file descriptor flags
1391 (such as non-blocking, though bash undoes that) for descriptors bash
1392 has open. Developed in consultation with Christos Zoulas
1393 <christos@zoulas.com>
1394
1395 2/3
1396 ---
1397
1398 lib/readline/text.c
1399 - rl_previous_screen_line: attempt to move to the same column on the
1400 previous screen line of the current readline buffer by moving back
1401 a number of characters equal to the screen width
1402 - rl_next_screen_line: attempt to move to the same column on the
1403 next screen line of the current readline buffer by moving forward
1404 a number of characters equal to the screen width. Both originally
1405 suggested by Hans Ginzel <hans@matfyz.cz>
1406
1407 lib/readline/readline.h
1408 - rl_{next,previous}_screen_line: extern declarations
1409
1410 lib/readline/funmap.c
1411 - {next,previous}-screen-line: new bindable command names
1412
1413 lib/readline/doc/{rluser.texi,readline.3}
1414 - {next,previous}-screen-line: document behavior, including limitations
1415
1416 2/5
1417 ---
1418 lib/readline/input.c
1419 - rl_read_key: when reading input from a macro, make sure to return
1420 the next character as an unsigned char, so we handle multibyte
1421 character sequences correctly. Report and fix from Grisha Levit
1422 <grishalevit@gmail.com>
1423
1424 2/6
1425 ---
1426 shell.c
1427 - --pretty-print: new invocation option, currently undocumented, dumps
1428 a pretty-printed version of a shell script given as an argument to
1429 stdout
1430 - main: call pretty_print_loop() if we're in pretty-printing mode in
1431 a non-interactive shell
1432
1433 eval.c
1434 - pretty_print_loop: new function, similar to reader_loop, reads
1435 commands and prints them by displaying the result from
1436 make_command_string()
1437
1438 externs.h
1439 - pretty_print_loop: new extern declaration
1440
1441 2/9
1442 ---
1443 doc/{bash.1,bashref.texi}
1444 - here strings: correct documentation to note they do not undergo
1445 brace expansion. Report from Conor McCarthy <mr.spuratic@gmail.com>
1446
1447 2/9
1448 ---
1449 lib/readline/display.c
1450 - expand_prompt: instead of recomputing the line break offsets for
1451 prompts that span multiple screen lines on every call to rl_redisplay,
1452 do it here. Manage a local array local_prompt_newlines; set an offset
1453 every time `physchars' hits a multiple of the screen width. Inspired
1454 by https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843819
1455 - rl_redisplay: don't calculate multi-line prompt line break indices
1456 here; use the values calculated by expand_prompt
1457 - rl_{save,restore}_prompt: save and restore local_prompt_newlines
1458
1459 2/11
1460 ----
1461 lib/readline/mbutil.c
1462 - _rl_find_prev_mbchar_internal: since we're traversing the string
1463 from the beginning, shortcut non-multibyte characters in a UTF-8
1464 locale
1465
1466 parse.y
1467 - parse_comsub: if we are parsing a here document with a quoted
1468 delimiter (LEX_QUOTEDDOC), we should not remove <backslash><newline>
1469 pairs from the body of the here document. Need to add LEX_QUOTEDDOC
1470 to the values in tflags when calling shell_getc. Fixes bug reported
1471 by Michael Homer <michael.homer@ecs.vuw.ac.nz>, patch was originally
1472 contributed by Geir Hauge <geir.hauge@gmail.com>
1473
1474 2/15
1475 ----
1476 jobs.c
1477 - bgp_add: if hashed pid collides with bgpids.head index, print a
1478 warning and move to the next index. Attempt to avoid collision
1479 problem reported by Graham Northup <northug@clarkson.edu>
1480
1481 2/17
1482 ----
1483 subst.c
1484 - process_substitute: call remove_quoted_escapes on the command string
1485 like command substitution does, since the string will be run through
1486 the parser again. Fixes bug reported by David Simmons
1487 <bug-bash@tmp.davidsimmons.com>
1488
1489 config-top.h
1490 - STATIC_PATH_VALUE: new config variable, undefined by default
1491
1492 variables.c
1493 - shell_initialize: if STATIC_PATH_VALUE is defined, use it to set the
1494 PATH variable at shell startup, overriding the environment and any
1495 value for DEFAULT_PATH_VALUE. Based on a suggestion from
1496 Lonnie Abelbeck <lonnie@abelbeck.com>
1497
1498 2/18
1499 ----
1500 shell.c
1501 - maybe_make_restricted: clear the hash table before making the PATH
1502 variable read-only by calling stupidly_hack_special_variables.
1503 Suggestion from Lonnie Abelbeck <lonnie@abelbeck.com>
1504
1505 subst.c
1506 - expand_string_for_pat: change expansion of WORD in ${param[%[%]][#[#]]word}
1507 to use this new function, initially identical to
1508 expand_string_for_rhs
1509 - getpattern: use expand_string_for_pat to expand the pattern
1510
1511 2/19
1512 ----
1513 subst.c
1514 - expand_string_for_rhs: now that this is only used to expand the RHS
1515 of the various non-pattern ${paramOPword} expansions, set
1516 expand_no_split_dollar_star depending on whether or not the entire
1517 brace expansion is going to be subjected to word splitting: if it's
1518 quoted or if IFS is set but null, we will not be splitting so we set
1519 this to 1 and let $* expand to separate fields separated by a space.
1520 This was heavily debated back in October 2014 and resulted in Posix
1521 interp 888. Reported by Martijn Dekker <martijn@inlv.org>
1522
1523 2/20
1524 ----
1525 subst.c
1526 - expand_string_for_rhs: now takes `op' (brace expansion operator) as
1527 an additional argument; changed call in parameter_brace_expand_rhs
1528 - expand_string_for_rhs: make sure to set expand_no_split_dollar_star
1529 if `op' is `=', since we are supposed to preserve the assignment
1530 statement expansion semantics on the RHS of ${param=word}
1531
1532 jobs.c
1533 - bgp_delindex: make sure to set ps->pid to NO_PID so we more
1534 effectively remove it from the hash table. It shouldn't matter as
1535 long as nothing in pidstat_table points to it, but better to be safe
1536 - bgp_delete,bgp_search: generalize previous collision detection to
1537 loop detection: abort search if we are going to go back to the
1538 first index we tried
1539
1540 2/21
1541 ----
1542 lib/readline/vi_mode.c
1543 - rl_vi_bword: if we're trying to move backward to non-whitespace
1544 in a line that begins with whitespace, make sure we don't move
1545 point to 0 and test memory locations before the start of the
1546 buffer. Report and fix from Jason Hood <jadoxa@yahoo.com.au>
1547
1548 lib/readline/display.c
1549 - expand_prompt: if _rl_screenwith == 0, call rl_reset_screen_size to
1550 initialize it. If it's still 0 after that, guess that the screen
1551 width is 80 and use that to guess how many screen lines the prompt
1552 consumes
1553
1554 lib/readline/readline.c
1555 - readline_internal_setup: if in emacs editing mode, and we are
1556 showing the editing mode in the prompt, call _rl_reset_prompt() to
1557 make sure that the updated setting of _rl_show_mode_in_prompt
1558 (presumably set in an inputrc file) is reflected in the redisplay
1559 performed by rl_callback_newline via readline_internal_setup.
1560 Fix from Jason Hood <jadoxa@yahoo.com.au>
1561
1562 2/22
1563 ----
1564 builtins/complete.def
1565 - print_one_completion,print_compopts: make sure to display the
1566 `nosort' and `noquote' options if they've been set for a particular
1567 compspec. Fix from Grisha Levit <grishalevit@gmail.com>
1568
1569 builtins/read.def
1570 - read_builtin: if -e is supplied, read needs to free rlbuf before
1571 returning, since it uses discard_unwind_frame at that point. Bug
1572 and fix from ZhangXiao <xiao.zhang@windriver.com>
1573
1574 execute_cmd.c
1575 - execute_for_command: when using a nameref as the for loop control
1576 variable, make sure we check for readonly namerefs and make sure
1577 that we force bind_variable to enforce restrictions on nameref
1578 assignments. Fix from Grisha Levit <grishalevit@gmail.com>
1579
1580 2/23
1581 ----
1582 general.c
1583 - make_absolute: convert deprecated cygwin_conv_to_full_posix_path
1584 to cygwin_conv_path (CCP_WIN_A_TO_POSIX, ...)
1585
1586 {shell,variables}.c,config-top.h
1587 - modify change from 2/17: rename STATIC_PATH_VALUE to RBASH_STATIC_PATH_VALUE;
1588 don't use it in shell_initialize; set PATH to it just before
1589 imposing restricted shell restrictions
1590
1591 2/24
1592 ----
1593 subst.c
1594 - expand_string_for_rhs: revert change from 2/19 concerning setting
1595 expand_no_split_dollar_star so we are consistent with the Posix
1596 examples. This anticipates Martijn Dekker initiating an austin
1597 group discussion about this case
1598
1599 2/25
1600 ----
1601 pcomplete.c
1602 - gen_shell_function_matches: if COMPREPLY is an associative array,
1603 don't coerce it to an indexed array, which will fail to produce any
1604 matches anyway. Report from Grisha Levit <grishalevit@gmail.com>
1605 - bind_comp_words: if COMP_WORDS exists as a nameref variable, ignore
1606 the nameref attribute. Report from Grisha Levit
1607 <grishalevit@gmail.com>
1608
1609 subst.c
1610 - parameter_brace_expand: if expand_no_split_dollar_star is set, make
1611 sure chk_atstar treats ${var[*]} as quoted by passing Q_DOUBLE_QUOTES
1612 as the second argument. Fixes differing treatment of $* and ${v[*]}
1613 reported by Grisha Levit <grishalevit@gmail.com>, because otherwise
1614 *contains_dollar_at gets set to 1 and the word is inappropriately
1615 split
1616
1617 3/1
1618 ---
1619 subst.c
1620 - expand_word_list_internal: if a variable assignment fails (e.g., due
1621 to a readonly variable) in a non-interactive posix mode shell, don't
1622 abort the shell if the assignment is being performed by the command
1623 builtin, even if it's something like `command eval v=1'. Fixes
1624 RedHat bug https://bugzilla.redhat.com/show_bug.cgi?id=1389838
1625 (reported by Denys Vlasenko)
1626
1627 3/3
1628 ---
1629 builtins/shopt.def
1630 - set_compatibility_level: make sure that changing the compatibility
1631 level sets or modifies BASH_COMPAT. Fixes bug reported by
1632 Stephane Chazelas <stephane.chazelas@gmail.com>
1633
1634 lib/glob/smatch.c
1635 - is_cclass: broke into two functions: is_valid_cclass and cclass_test,
1636 for future expansion. No functionality change
1637
1638 lib/glob/sm_loop.c
1639 - BRACKMATCH: when testing a character against a character class name,
1640 use the unfolded (original) character, since we're not performing a
1641 comparison. This is what glibc does. Fixes bug reported by
1642 Lukáš BaÅinka <lukas.barinka@boxtrap.net>
1643
1644 3/4
1645 ---
1646 doc/{bash.1,bashref.texi}
1647 - note that the arguments to -eq and the rest of the arithmetic
1648 operators are evaluated as expressions when using [[. Report from
1649 Rob la Lau <rob@ohreally.nl>
1650
1651
1652 3/7
1653 ---
1654 lib/readline/display.c
1655 - update_line: completely rewrote the code that handles line wrapping
1656 in the presence of multibyte/double-width characters; punts to a
1657 dumb update in cases where the number of screen positions doesn't
1658 match
1659 - update_line: in one case, where we are deleting characters from the
1660 line, if we are writing a non-space into the last screen character
1661 position, note that we are no longer using a space as a placeholder
1662 for a line wrap where there is a multi-width character that won't
1663 fit on the screen line (wrapped_line[current_line+1] = 0)
1664
1665 3/10
1666 ----
1667 lib/readline/readline.c
1668 - bind_arrow_keys_internal: add default key bindings for control-
1669 arrow keys, suggested by Per Bothner <per@bothner.com>
1670
1671 3/13
1672 ----
1673 doc/{bash.1,bashref.texi}
1674 - clarify the prompt strings the undergo expansion (PS0, PS1, PS2, and
1675 PS4) before being displayed. Based on a report from Grisha Levit
1676 <grishalevit@gmail.com>
1677
1678 3/14
1679 ----
1680 input.c
1681 - bufstream_ungetc: return EOF if being asked to unget a character to
1682 a NULL buffer
1683 - buffered_getchar: check buffered_fd is valid and buffers[buffered_fd]
1684 is non-NULL before trying to dereference. Fixes bug reported by
1685 floyd <floyd@floyd.ch>
1686
1687 execute_cmd.c
1688 - execute_null_command: if we fork to execute the command, the subshell
1689 is not interactive
1690 - execute_null_command: for safety's sake, if a redirection attached
1691 to a null command affects fd 0 or the fd the shell is reading for
1692 input, and the redirection can potentially change or close that file
1693 descriptor, force a fork so the redirection is done in a subshell
1694
1695 3/15
1696 ----
1697 lib/readline/display.c
1698 - update_line: if we have to output some bytes, and we are outputting
1699 the prompt string, make sure we correct _rl_last_c_pos if we are
1700 at the wrap offset -- what if all of the characters in the prompt
1701 are invisible, so the visible length is 0? Fixes display bug
1702 reported by Grisha Levit <grishalevit@gmail.com>
1703
1704 execute_cmd.c
1705 - undo_partial_redirects: new function, performs redirections specified
1706 in redirection_undo_list and disposes of them. Intended to be used
1707 to unwind redirections performed before a redirection error
1708 - dispose_partial_redirects: new function, disposes of
1709 redirection_undo_list and nulls the list
1710 - execute_command_internal: use undo_partial_redirects
1711
1712 execute_cmd.h
1713 - undo_partial_redirects: extern declaration
1714 - dispose_partial_redirects: extern declaration
1715
1716 subst.c
1717 - exp_jump_to_top_level: if we are throwing an expansion error while
1718 expanding a redirection (expanding_redir != 0), undo any undoable
1719 redirections by calling undo_partial_redirects() so we don't leave
1720 any in place
1721
1722 variables.c
1723 - initialize_shell_variables: if SHELLOPTS is in the environment,
1724 unset the readonly attribute on any existing variable with that
1725 name. It may have been created by processing a -o option on the
1726 command line. Fixes issue reported by Stephane Chazelas
1727 <stephane.chazelas@gmail.com>
1728
1729 3/16
1730 ----
1731 lib/readline/histfile.c
1732 - read_history_range: short-circuit and do nothing if the history file
1733 is of 0 size
1734 - read_history_range: make sure the buffer is zero-terminated so the
1735 timestamp tests work right for history files of 1 character. Report
1736 and recommended fix from Denis Martinez <denis.martinez@gmx.com>
1737
1738 lib/readline/complete.c
1739 - compute_lcd_of_matches: when trying to compute the common prefix
1740 of a set of matches while performing case-insensitive completion
1741 matching, don't sort the match list unless rl_sort_completion_matches
1742 is non-zero. Fixes problem reported by Roee Bar <roee@arista.com>
1743
1744 3/18
1745 ----
1746 subst.c
1747 - extract_dollar_brace_string: handle process substitution embedded in
1748 a ${...} expansion in the same way as command substitution. Reported
1749 by D630 <d630@posteo.net>
1750
1751 parse.y
1752 - LEX_GTLT: new flag, set by parse_matched_pair when a `<' or '>' is
1753 read
1754 - parse_matched_pair: handle an embedded process substitution like an
1755 embedded command substitution if we are parsing an array index or
1756 a dollar-brace expansion. Reported by D630 <d630@posteo.net>
1757
1758 3/21
1759 ----
1760 subst.h
1761 - ASS_NOEVAL, ASS_NOLONGJMP: new values for assignments, used by
1762 make_variable_value
1763
1764 variables.c
1765 - make_variable_value: ASS_NOEVAL: if this is set, don't attempt
1766 arithmetic evaluation or case modification, just produce the value
1767 (still honor ASS_APPEND)
1768 - make_variable_value: ASS_NOLONGJMP: don't longjmp back to top_level
1769 if arithmetic evaluation fails due to a syntax error
1770 - bind_variable_internal: make sure aflags is passed to all calls to
1771 make_variable_value
1772 - push_temp_var: add ASS_NOLONGJMP to the flags passed to
1773 bind_variable_internal. Fixes bug reported by D630 <d630@posteo.net>
1774
1775 bashline.c
1776 - bash_execute_unix_command: don't bother to attempt optimization by
1777 checking whether the call to parse_and_execute changes $READLINE_LINE;
1778 it can be defeated by the new code that optimizes appends to string
1779 variables. Bug reported by Grisha Levit <grishalevit@gmail.com>
1780
1781 3/22
1782 ----
1783 subst.c
1784 - expand_string_for_rhs: re-apply change from 2/19 based on discussion
1785 on the austin-group mailing list about how unquoted ${var-$*}
1786 expands when IFS is null. Originally reported by Martijn Dekker
1787 <martijn@inlv.org>
1788
1789 3/25
1790 ----
1791 parse.y
1792 - read_token_word: if we read a WORD immediately after a CASE, FOR, or
1793 SELECT, increment `expecting_in_token' to note that we're going to
1794 be reading IN as the next non-newline token
1795 - special_case_tokens: if we're expecting an IN (expecting_in_token > 0)
1796 and we have an "in", return IN and decrement expecting_in_token. This
1797 is a better implementation of Posix grammar rule 6 than the previous
1798 code in that function (which is still there for posterity, but should
1799 eventually be removed). Fixes bug reported by Torka Noda
1800 <kanito.tasoga@gmail.com>
1801
1802 subst.c
1803 - string_list_pos_params: if the expansion is not quoted, and IFS is
1804 null, return a string containing the quoted positional parameters
1805 separated by spaces. Callers know what to do with the string
1806 - parameter_brace_substring,parameter_brace_remove_pattern,
1807 parameter_brace_transform,parameter_brace_patsub,parameter_brace_casemod:
1808 for the VT_POSPARMS case, after calling the operator-specific
1809 expansion function, which eventually calls string_list_pos_params,
1810 leave the returned string alone, since it's already quoted properly
1811 - parameter_brace_expand: after calling the above functions to perform
1812 expansions, if the expansion is being performed on an unquoted $*
1813 when IFS is null, set the W_SPLITSPACE flag in the return WORD_DESC
1814 so that splitting on spaces is performed on the already-quoted word.
1815 Fixes bug reported by Grisha Levit <grishalevit@gmail.com>
1816
1817 3/28
1818 ----
1819 subst.c
1820 - process_substitute: change so the subshell doesn't inherit the 'v'
1821 option, like command substitution now does (as of bash-4.4).
1822 Suggested by Grisha Levit <grishalevit@gmail.com>
1823
1824 3/30
1825 ----
1826 subst.c
1827 - parameter_brace_casemod: now takes a pflags parameter, like
1828 parameter_brace_patsub; changed callers
1829 - parameter_brace_transform: now takes a pflags parameter, like
1830 parameter_brace_patsub; changed callers
1831 - pos_params_pat_subst,pos_params_modcase: if mflags indicates we're
1832 on the rhs of an assignment statement and not going to perform
1833 word splitting, we're expanding $*, and $IFS is null, make sure
1834 string_list_pos_params treats the expansion as double-quoted, so
1835 the positional parameters will be concatenated. Fixes bug reported
1836 by Grisha Levit <grishalevit@gmail.com>
1837
1838 3/31
1839 ----
1840 doc/{bash.1,bashref.texi}
1841 - add notes to the description of pipelines emphasizing that each
1842 element of a pipeline is executed in a subshell, referring to the
1843 description of a command execution environment, and that the
1844 lastpipe option can modify that behavior. From a discussion with
1845 Jean Delvare <jdelvare@suse.de>
1846
1847 4/1
1848 ---
1849 subst.c
1850 - expand_word_internal: set had_quoted_null to note for later if we
1851 expand '', "", or "$x" when x is unset
1852 - expand_word_internal: if we expand "$param" (or "${param}") and we
1853 come back with a single word with the W_HAVEQUOTEDNULL flag set,
1854 make sure we set had_quoted_null to remember it for later. In this
1855 case, if we already have seen a quoted null and we expanded $@ in
1856 this (sub)string expansion, we don't want to do any of the special
1857 $@ handling. In particular, we don't want to set *expanded_something,
1858 because that will result in word splitting and quoted null removal.
1859 Fixes bug reported by Grisha Levit <grishalevit@gmail.com>
1860 - parameter_brace_patsub: when expanding ${*/pat/sub} in the case
1861 where ifs_is_null != 0 and (pflags & PF_NOSPLIT2) (meaning we aren't
1862 going to be doing word splitting), pass MATCH_ASSIGNRHS so we do
1863 the right thing in this case. Part of a set of cases inspired by
1864 Grisha Levit <grishalevit@gmail.com>
1865 - param_expand: case '*': if we are on the rhs of an assignment
1866 (PF_ASSIGNRHS) and ifs is unset, and $1 == " ", we need to make sure
1867 string_list_dollar_at gets called with Q_DOUBLE_QUOTES so it quotes
1868 the positional parameters before joining them into a string with
1869 string_list_internal. Otherwise, that first space gets removed by
1870 the implicit word splitting that gets performed. Reported by
1871 Grisha Levit <grishalevit@gmail.com>
1872
1873 array.c
1874 - array_patsub,array_modcase: handle ${A[*]} identically to $* when
1875 not quoted and IFS is null (separate with spaces). Makes things
1876 like ${A[*]/x/y} behave the same as ${*/x/y} when IFS is null
1877
1878 subst.c
1879 - parameter_brace_patsub,parameter_brace_casemod: if expanding ${A[*]}
1880 when the match is on the rhs of an assignment statement (PF_ASSIGNRHS)
1881 and ifs is null, make sure the match is performed as if it were
1882 quoted
1883 - parameter_brace_substring: now takes a PFLAGS argument
1884 - parameter_brace_substring: if expanding $* in a context where we
1885 don't want to do word splitting (expand_no_split_dollar_star &&
1886 PF_NOSPLIT2), make sure we expand $* as if it were quoted
1887 - parameter_brace_substring: if expanding an unquoted $* on the rhs of
1888 an assignment statement when IFS is null, make sure we expand the $*
1889 as if it were quoted
1890
1891 4/4
1892 ---
1893 doc/{bash.1,bashref.texi}
1894 - read: document that a delim argument of '' terminates each line when
1895 a NUL character appears
1896
1897 4/5
1898 ---
1899 subst.c
1900 - parameter_brace_expand_word: handle case where unquoted $@ is
1901 expanded in a context where word splitting is not performed (PF_NOSPLIT2)
1902 and IFS is not equal to the standard value
1903 - param_expand: handle case where unquoted $@ is expanded in a context
1904 where word splitting is not performed (PF_NOSPLIT2) and IFS is not
1905 equal to the standard value. Fixes bug with IFS == $1 when expanding
1906 unquoted $@ reported by Grisha Levit <grishalevit@gmail.com>
1907
1908 4/7
1909 ---
1910 subst.c
1911 - pos_params_pat_subst: if MATCH_ASSIGNRHS is set, don't expand $*
1912 as quoted unless expand_no_split_dollar_star is also set. Fixes
1913 expansion bug reported on 4/4 by Grisha Levit <grishalevit@gmail.com>
1914 - parameter_brace_transform: if we transform unquoted A[@] or A[*]
1915 when IFS is null, don't quote the result of array_transform in the
1916 same way we don't quote the result of parameter_list_transform,
1917 since it will come back quoted. Fixes bug reported by
1918 Grisha Levit <grishalevit@gmail.com>
1919 - list_transform: if we transform unquoted $* or ${a[*]} when IFS is
1920 null and expand_no_split_dollar_star is non-zero, call
1921 string_list_pos_params with Q_DOUBLE_QUOTES to inhibit splitting.
1922 We do this in all cases except @Q, which is inconsistent but more
1923 intuitive.
1924 Fixes bug reported by Grisha Levit <grishalevit@gmail.com>
1925
1926 4/8
1927 ---
1928 builtins/read.def
1929 - read_mbchar: if unbuffered == 2, we are running read -N and need to
1930 use zreadn to read the rest of the multibyte char, since the
1931 previous call to zreadn may have buffered characters. Fixes bug
1932 reported by Stephane Chazelas <stephane.chazelas@gmail.com>
1933
1934 pathexp.h
1935 - QGLOB_CTLESC: new flag for quote_string_for_globbing: means to turn
1936 CTLESC CTLESC (quoted CTLESC that's usually removed as part of
1937 word splitting or quote removal) into CTLESC
1938
1939 pathexp.c
1940 - quote_string_for_globbing: if QGLOB_CTLESC is present in flags,
1941 turn CTLESC CTLESC into CTLESC, even if the first CTLESC is preceded
1942 by a backslash. Callers can't do this because the remaining CTLESC
1943 will be treated as a quoting character and turned into a backslash
1944
1945 execute_cmd.c
1946 - execute_case_command: if the pattern is not quoted, make sure to tell
1947 quote_string_for_globbing to turn CTLESC CTLESC into CTLESC by
1948 passing QGLOB_CTLESC. Fixes bug reported 4/2 by Martijn Dekker
1949 <martijn@inlv.org>
1950
1951 4/9
1952 ---
1953 subst.c
1954 - string_transform: after calling ansiexpand for the `E' transformation,
1955 need to call dequote_escapes because ansiexpand assumes it is being
1956 called by the parser and arranges for ansicstr to quote CTLESC and
1957 CTLNUL with CTLESC. Reported by Grisha Levit <grishalevit@gmail.com>
1958
1959 variables.c
1960 - mk_env_string: when exporting functions, run them through
1961 dequote_escapes because any strings containing CTLESC or CTLNUL are
1962 still quoted with CTLESC. Reported by Grisha Levit
1963 <grishalevit@gmail.com>
1964
1965 subst.[ch]
1966 - quote_escapes,dequote_escapes: now take const char * argument
1967
1968 execute_cmd.c
1969 - execute_intern_function: if the function name contains CTLESC, run
1970 it through dequote_escapes just in case it got CTLESC quoting
1971 CTLESC or CTLNUL from the parser
1972
1973 4/11
1974 ----
1975 eval.c
1976 - reader_loop: make sure PS0 is expanded and displayed before
1977 incrementing the command number
1978
1979 parse.y
1980 - prompt_history_number: function to make history number as reported
1981 by \!, or posix mode !!, be the same index that the (possibly multi-
1982 line) command will be stored with. The history library increments
1983 history_offset as soon as a new line is entered, and it's up to the
1984 history code to store the second and subsequent lines of a command
1985 in the same history entry. If we are expanding PS0 or PS4, or
1986 a ${var@P} expansion, we're already past the history entry no
1987 matter what. Inspired by patch from Grisha Levit
1988 <grishalevit@gmail.com>
1989 - decode_prompt_string: call prompt_history_number
1990 - decode_prompt_string: if expanding PS4 or ${var@P}, make the
1991 command number the same as reported by PS0/PS1/PS2
1992
1993 4/12
1994 ----
1995 support/Makefile.in
1996 - clean: remove man2html.o as part of this production instead of
1997 waiting until `distclean'. Reported by chrlis <chrlis@sbrella.com>
1998
1999 subst.c
2000 - string_list_pos_params: if we are expanding $* in a context where
2001 IFS is null and expand_no_split_dollar_star is set (no word
2002 splitting), use string_list_dollar_star to force the positional
2003 parameters to be joined without first separating them into a list
2004 and attempting to join them later. Fixes problem with constructs
2005 like ${var=${*:1}}, pointed out by Grisha Levit
2006 <grishalevit@gmail.com>. This undoes change to @Q from 4/7, so
2007 list_transform change reverted
2008
2009 4/19
2010 ----
2011 builtins.h
2012 - added BUILTINS_H include guard
2013
2014 examples/loadables/Makefile.in
2015 - install loadables.h as sample include file, along with Makefile.inc
2016
2017 4/23
2018 ----
2019 bashline.c
2020 - maybe_make_readline_line: don't try to do anything if the passed
2021 NEW_LINE is NULL. Report from Jaren Stangret <sirjaren@gmail.com>,
2022 fix from Eduardo Bustamante <dualbus@gmail.com>
2023
2024 4/24
2025 ----
2026 parse.y
2027 - xparse_dolparen: if the current token (the last thing read_token
2028 returned to yylex) is shell_eof_token, assume that it is the new
2029 bison lookahead token and clear it. Fixes bug reported by
2030 Werner Fink <werner@suse.de>
2031
2032 4/25
2033 ----
2034 doc/{bash.1,bashref.texi}
2035 - cmdhist: clarify that this option only has an effect if history is
2036 enabled. Suggested by Matthew Braun <matthew@powerplug.com>
2037
2038 4/26
2039 ----
2040 jobs.c
2041 - wait_for: if a non-interactive shell with job control enabled (set -m)
2042 detects that a foreground job died due to SIGINT, act as if the shell
2043 also received the SIGINT. Prompted by an austin-group-l discussion
2044 - waitchld: run SIGCHLD trap for each child exited even if job control
2045 is not enabled when in Posix mode. Prompted by an austin-group-l
2046 discussion
2047
2048 4/27
2049 ----
2050 lib/readline/histfile.c
2051 - read_history_range: if the history file is empty, free the history
2052 filename before returning. Report and fix from Eduardo Bustamante
2053 <dualbus@gmail.com>
2054
2055 lib/readline/bind.c
2056 - rl_parse_and_bind: make sure there is something, even if it's a
2057 quoted empty string, before the `:' in a key binding. Report from
2058 Eduardo Bustamante <dualbus@gmail.com>
2059 - rl_parse_and_bind: if the right side of a key binding starts with a
2060 quote, make sure there's a matching close quote before treating it
2061 as a macro definition
2062 - rl_translate_keyseq: if a key sequence ends with \C- or \M- (or
2063 \C-\M-) make sure we break out of the loop if moving to the character
2064 to be translated is a NUL. Old code did this only in the \C-\M-
2065 case. Report from Eduardo Bustamante <dualbus@gmail.com>
2066
2067 4/28
2068 ----
2069 lib/glob/sm_loop.c
2070 - GMATCH: implement a clever technique from glibc that avoids
2071 backtracking past a `*' if we've already chosen to use it and need
2072 matches beyond it. Look at https://research.swtch.com/glob for a
2073 longer explanation. This results in a significant speedup for globs
2074 with multiple instances of `*', especially with more than 4.
2075
2076 5/2
2077 ---
2078 lib/readline/bind.c
2079 - rl_translate_keyseq: make sure a trailing backslash in the key
2080 sequence is preserved. Report from Eduardo Bustamante
2081 <dualbus@gmail.com>
2082
2083 5/3
2084 ---
2085 builtins/builtin.def
2086 - builtin_builtin: make sure to set this_shell_builtin to the builtin
2087 command being executed, overwriting `builtin'. Leave
2088 last_shell_builtin alone. Fixes bug reported by Luiz Angelo Daros
2089 de Luca <luizluca@gmail.com>
2090
2091 jobs.c
2092 - waitchld: modify change of 4/26 to run SIGCHLD traps even if job
2093 control is not enabled
2094
2095 lib/readline/misc.c
2096 - rl_get_previous_history: if we didn't find a previous history entry
2097 to use, call rl_maybe_unsave_line before returning because we
2098 aren't going to use the saved line, and it has the same undo list
2099 as rl_undo_list. Fixes fuzzing bug reported by Eduardo Bustamante
2100 <dualbus@gmail.com>
2101 - rl_get_{next,previous}_history: if there is no history list, don't
2102 bother doing anything
2103
2104 5/4
2105 ---
2106 expr.c
2107 - popexp: if we error out due to stack underflow, make sure to zero out
2108 expression and lasttp; they may contain undefined values we don't
2109 want evalerror to print
2110 - expr_unwind: handle expr_depth decrementing below zero
2111 - evalexp: restore the old value of evalbuf even if we error and
2112 longjmp; we may have called evalexp recursively
2113 - evalerror: make sure expression is non-NULL before trying to print it.
2114 These fix fuzzing bug reported by Eduardo Bustamante
2115 <dualbus@gmail.com>, happens only in cases where we don't longjmp on
2116 a fatal expansion error
2117
2118 5/5
2119 ---
2120 parse.y
2121 - read_token_word: when checking for a word that's a target of a
2122 redirection, we can potentially call valid_array_reference, which
2123 can end up calling the parser recursively. If it does that, we
2124 need to make sure that yylval.word doesn't change, so we set it back
2125 to the_word. Fixes another fuzzing bug
2126
2127 parse.y
2128 - arith_for_command: make syntax errors in the arithmetic for command
2129 (signaled by make_arith_for_command returning NULL) more like
2130 language syntax errors by calling YYERROR. Avoids complicated
2131 attempts at error recovery and dealing with NULL returns from
2132 command productions. Pointed out by Eduardo Bustamante
2133 <dualbus@gmail.com>
2134
2135 lib/readline/kill.c
2136 - _rl_copy_to_kill_ring: make sure the current slot in the kill ring
2137 has something in it, even if the last command was a kill, before
2138 trying to modify it. Another fuzzing bug
2139
2140 5/6
2141 ---
2142 builtins/read.def
2143 - read_builtin: if we see a backslash when not in raw mode (not -r),
2144 only back up `i' when we read the next character if we know we added
2145 a CTLESC the last time through the loop (skip_ctlesc == 0),
2146 especially if i == 0. Another fuzzing bug from Eduardo Bustamante
2147 <dualbus@gmail.com>
2148
2149 5/8
2150 ---
2151 builtins/read.def
2152 - read_mbchar: handle zreadn/zreadc/zread returning EOF in the middle
2153 of an incomplete multibyte sequence. Fixes another fuzzing bug
2154 - read_builtin: use mb_cur_max instead of constant 4 when deciding
2155 whether the next character can exceed the number of bytes available
2156 in input_string
2157
2158 lib/readline/input.c
2159 - MinGW: include <conio.h> before <io.h>. Fix from Eli Zaretskii
2160 <eliz@gnu.org>
2161
2162 builtins/read.def
2163 - read_builtin: if we get input from readline, we need to get the
2164 remainder of a multibyte character from rlbuf instead of calling
2165 read_mbchar. Bug reported by Eduardo Bustamante <dualbus@gmail.com>
2166
2167 5/9
2168 ---
2169 parse.y
2170 - token_is_assignment: use the allocated buffer approach in all cases,
2171 not just if we're not using bash malloc. This avoids the assignment
2172 to t[i+1] writing beyond the end of the allocated token if
2173 i == token_buffer_size - 1. Another fuzzing bug
2174 - xparse_dolparen: if parse_string returns < 0, we clear out the
2175 current shell_input_line before performing a longjmp, since we're
2176 abandoning parsing of this command. This is consistent with how
2177 the parser resynchronizes after other syntax errors
2178 - GRAMMAR: add 'error yacc_EOF' production to handle a syntax error
2179 that's immediately followed by an EOF after resynchronization.
2180 Fixes another fuzzing bug
2181
2182 5/10
2183 ----
2184 lib/readline/text.c
2185 - _rl_set_mark_at_pos: don't let the mark be set to a position < 0.
2186 Fixes a fuzzing bug
2187 - rl_exchange_point_and_mark: don't do anything if the mark is already
2188 less than 0
2189
2190 5/12
2191 ----
2192 lib/readline/rlmbutil.h
2193 - wchar_t: make sure this is defined as int if multibyte characters
2194 aren't supported
2195
2196 lib/readline/text.c
2197 - _rl_change_case: don't force use of ascii toupper and tolower if
2198 isascii returns true; it's not defined to work on characters outside
2199 the 0..255 (really 0..127) range. Bug reported by
2200 Eduardo Bustamante <dualbus@gmail.com>
2201
2202 5/14
2203 ----
2204 lib/readline/text.c
2205 - rl_change_case: handle case where the old and new characters (after
2206 the case change) are not the same number of bytes. Pointed out in
2207 http://lists.gnu.org/archive/html/bug-bash/2015-01/msg00091.html
2208
2209 lib/readline/display.c
2210 - expand_prompt: use `ret' as first parameter to _rl_find_prev_mbchar
2211 since that needs the base of the array. Bug from fuzzing reported by
2212 Eduardo Bustamante <dualbus@gmail.com>
2213
2214 5/15
2215 ----
2216 execute_cmd.c
2217 - execute_simple_command, execute_arith_command, execute_cond_command,
2218 execute_arith_for_command: adjust the line number when executing a
2219 function interactively so that the first command in the function is
2220 line 1, not line 0, as Posix requires. Reported by Robert Elz
2221 <kre@bmunnari.OZ.AU>
2222 - execute_simple_command, execute_arith_command, execute_cond_command,
2223 execute_arith_for_command: ony adjust the line number when executing
2224 a function interactively if we are not sourcing a file
2225 (sourcelevel == 0), so this is consistent everywhere we adjust the
2226 line number
2227
2228 5/16
2229 ----
2230 bashline.c
2231 - bash_directory_completion_hook: when calling split_at_delims to see
2232 whether a ${ or $( is closed, use the right value for `start' relative
2233 to the substring beginning at `$'. Bug from fuzzing reported by
2234 Eduardo Bustamante <dualbus@gmail.com>
2235
2236 expr.c
2237 - expassign: if the call to expcond generates a syntax error in a
2238 context when the shell won't longjmp (like when evaluating $PS1),
2239 it will end up NULL and we need to catch it before calling strlen.
2240 Bug from fuzzing reported by Eduardo Bustamante <dualbus@gmail.com>
2241
2242 examples/bash-completion/
2243 - new place to include a current or recent version of the
2244 bash-completion package
2245
2246 5/19
2247 ----
2248 lib/readline/display.c
2249 - CHECK_INV_LBREAKS: new versions for multibyte and single-byte chars,
2250 so the multibyte version can check and increase the size of
2251 line_state_invisible->wbsize and line_state_invisible->wrapped_line,
2252 callers who call CHECK_INV_LBREAKS must update
2253 wrapped_line[newlines] when in HANDLE_MULTIBYTE mode. Fuzzing bug
2254 reported by Eduardo Bustamante <dualbus@gmail.com>
2255
2256 5/24
2257 ----
2258 lib/readline/search.c
2259 - _rl_nsearch_callback,noninc_search: handle _rl_search_getchar
2260 returning -1 (EOF or read error) by aborting the search.
2261 Fuzzing bug reported by Eduardo Bustamante <dualbus@gmail.com>
2262
2263 5/25
2264 ----
2265 variables.c
2266 - localvar_inherit: new variable, controlled by shopt localvar_inherit
2267 option
2268 - make_local_variable: if localvar_inherit is set, the new local
2269 variable inherits a previous scope's variable's value, attributes
2270 (except nameref), and dynamic variable information. If a local
2271 variable inherits a value, the local is not invisible
2272
2273 builtins/shopt.def
2274 - localvar_inherit: new option
2275
2276 doc/{bash.1,bashref.texi}
2277 - localvar_inherit: document new shopt option
2278
2279 5/29
2280 ----
2281 lib/readline/readline.c
2282 - _rl_subseq_result: only return -1 and back up the chain if we are
2283 dealing with a result (r) that's already < 0 and we are at the end
2284 of a multi-key sequence. Otherwise, a failing readline command (e.g.,
2285 delete-char at the end of a line) could cause this code to be
2286 executed. Report from Nuzhna Pomoshch <nuzhna_pomoshch@yahoo.com>
2287
2288 lib/readline/histfile.c
2289 - read_history_range: if the file isn't a regular file, return an
2290 error. Bug report from Eduardo Bustamante <dualbus@gmail.com>,
2291 relaying from IRC
2292
2293 5/30
2294 ----
2295 variables.c
2296 - set_pwd: if in Posix mode, and PWD appears in initial environment as
2297 an absolute pathname to the current directory, set PWD to the result
2298 of canonicalizing the environment value, or to the physical path if
2299 canonicalization fails. From a suggestion by Eduardo Bustamante
2300 <dualbus@gmail.com>
2301
2302 5/31
2303 ----
2304 builtins/read.def
2305 - read_builtin: if -n or -N option is supplied with a 0 argument,
2306 don't attempt to read any characters; bail out right away. Reported
2307 by Eduardo Bustamante <dualbus@gmail.com>, relaying from IRC
2308
2309 6/3
2310 ---
2311 config.h.in
2312 - HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC: add define, used by stat-time.h
2313 to construct a timespec from struct stat. Report and fix from
2314 Siteshwar Vashisht <svashisht@redhat.com>
2315
2316 variables.h
2317 - att_regenerate: new internal variable attribute: if set, regenerate
2318 dynamic variable's value when it's exported and we are creating the
2319 export environment
2320
2321 variables.c
2322 - init_dynamic_variables: LINENO, EPOCHSECONDS, EPOCHREALTIME: set
2323 internal regenerate attribute for these dynamic variables
2324 - make_env_array_from_var_list: if a dynamic variable has the
2325 regenerate attribute set, call the dynamic value function to generate
2326 an updated value before placing it in the environment. From a report
2327 about exporting LINENO from Robert Elz <kre@bmunnari.OZ.AU>
2328
2329 6/4
2330 ---
2331 lib/glob/sm_loop.c
2332 - BRACKMATCH: at the matched: label, make sure we get the bracket
2333 character we're looking for (char class, collating symbol. etc.)
2334 before we decrement the count of braces we're looking for. Eventually
2335 we could do something about badly-formed bracket expressions
2336
2337 6/7
2338 ---
2339 lib/readline/histlib.h
2340 - strchr: only declare if __STDC__ is not defined, since we already
2341 include <string.h>. Report from Chi-Hsuan Yen <yan12125@gmail.com>
2342
2343 6/9
2344 ---
2345 lib/readline/display.c
2346 - update_line: when wrapping lines with multibyte chars at the end of
2347 the new line being wrapped, make sure we copy the NULL byte in old
2348 when moving the contents of old around. Fuzzing bug reported by
2349 Eduardo Bustamante <dualbus@gmail.com>
2350
2351 lib/readline/mbutil.c
2352 - _rl_get_char_len: use MB_CUR_MAX in the call to mbrlen; there's no
2353 need to look at the rest of the string when we're just interested in
2354 the length of a single character
2355
2356 6/12
2357 ----
2358 jobs.c
2359 - wait_for: when waiting for the next child to exit (ANY_PID), make
2360 sure to restore the old SIGINT handler before returning. Fixes
2361 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864649
2362
2363 6/14
2364 ----
2365 lib/readline/display.c
2366 - expand_prompt: make sure `ret' is NULL-terminated before calling
2367 _rl_prev_mbchar_internal, since that calls strlen, which requires
2368 the passed string to be NULL-terminated. Another fuzzing bug.
2369
2370 6/15
2371 ----
2372 lib/readline/isearch.c
2373 - _rl_isearch_fini: use rl_replace_line instead of strcpy so rl_end
2374 gets set right
2375 - _rl_isearch_fini: after restoring rl_point, call _rl_fix_point so
2376 we don't set rl_point > rl_end. Fixes a fuzzing bug
2377
2378 lib/readline/mbutil.c
2379 - _rl_find_next_mbchar_internal: if _rl_adjust_point returns < 0,
2380 just punt, treat the value as a byte, and advance point by 1
2381
2382 lib/readline/util.c
2383 - rl_tilde_expand: rearrange code in the whitespace loop so that
2384 `start' gets tested first and we don't try to dereference
2385 rl_line_buffer[-1]. Another fuzzing bug from dualbus@gmail.com
2386
2387 bashline.c
2388 - bash_dequote_filename: make sure that pointers that are used as
2389 indices into sh_syntaxtab are cast to unsigned char first, to
2390 avoid problems with signed chars > 128. Fixes a fuzzing bug.
2391
2392 lib/readline/kill.c
2393 - _rl_copy_to_kill_ring: when reallocating the kill ring, make sure to
2394 allocate one more than the max number of kills so the loop that
2395 copies the kill ring entries down runs right (and to mirror the
2396 initial allocation). Fixes a fuzzing bug.
2397
2398 lib/readline/isearch.c
2399 - _rl_isearch_dispatch: make sure that cxt->sline_index never goes < 0
2400 even when searching a line in reverse. Fixes a fuzzing bug
2401
2402 6/16
2403 ----
2404 parse.y
2405 - xparse_dolparen: short-circuit immediately if passed a empty string
2406
2407 lib/readline/display.c
2408 - update_line: when wrapping multibyte characters, make sure we deal
2409 with WCWIDTH returning -1. Fixes a fuzzing bug
2410
2411 6/17
2412 ----
2413 execute_cmd.c
2414 - execute_coproc: make sure `invert' is set before trying to use it
2415 when returning failure on invalid coproc name. Report and fix from
2416 Eduardo Bustamante <dualbus@gmail.com>
2417 - execute_command_internal: make sure execute_coproc sets
2418 last_command_exit_value if it returns failure, so an invalid name
2419 can set $? = 1. Report and fix from Eduardo Bustamante
2420 <dualbus@gmail.com>
2421
2422 lib/readline/display.c
2423 - update_line: make sure all references to `wrapped_line' are wrapped
2424 with #ifdef HANDLE_MULTIBYTE. Report and fix from Eduardo Bustamante
2425 <dualbus@gmail.com>
2426
2427 lib/readline/vi_mode.c
2428 - _rl_vi_change_char: don't use rl_point++ when you mean to move
2429 forward a character; use _rl_vi_append_forward to account for
2430 multibyte characters and take vi end of line handling into account
2431 - _rl_vi_last_replacement: now an array of chars whether we are
2432 using multibyte chars or not. If we're not, the character we read
2433 to use as the replacement is saved as the first element of the array
2434 - rl_vi_change_char,_rl_vi_callback_change_char: changes to deal with
2435 _rl_vi_last_replacement being an array. Fixes bug reported by
2436 Eduardo Bustamante <dualbus@gmail.com>
2437
2438 lib/readline/mbutil.c
2439 - _rl_get_char_len: look at at most MB_CUR_MAX characters, but maybe
2440 fewer if the length of the string is less
2441
2442 builtins/bind.def
2443 - unbind_keyseq: new function for the -r option; checks whether the
2444 key sequence is actually bound before trying to bind it to NULL.
2445 Partial fix for https://savannah.gnu.org/support/?109329
2446
2447 parse.y
2448 - augment `error yacc_EOF' production to call YYABORT in non-interactive
2449 shells or calls to parse_and_execute (eval, command substitution,
2450 etc.) Fixes bug reported by Martijn Dekker <martijn@inlv.org>
2451
2452 6/19
2453 ----
2454 bashline.c
2455 - edit_and_execute_command: don't add rl_line_buffer to the history
2456 list if it's empty; consistent with how other code treats an empty
2457 line
2458
2459 execute_cmd.c
2460 - execute_builtin: make sure to preserve the temporary env across the
2461 execution of the `read' builtin or `fc' builtin if HISTORY is
2462 defined, in case `read -e' calls edit-and-execute-command. Should
2463 have no side effects. Reported by Eduardo Bustamante
2464 <dualbus@gmail.com>
2465
2466 general.c
2467 - line_isblank: new function: returns true if passed string is composed
2468 entirely of blanks
2469
2470 general.h
2471 - line_isblank: new extern declaration
2472
2473 parse.y
2474 - history_delimiting_chars: return "" for a blank line, since there's
2475 nothing to delimit with `;'
2476
2477 6/21
2478 ----
2479 jobs.c
2480 - wait_for: make sure to call restore_sigint_handler before returning
2481 if we return out of the loop due to no children. Report from
2482 Eduardo Bustamante <dualbus@gmail.com>
2483
2484 subst.c
2485 - expand_word_internal: if split_on_spaces is set, and the word is
2486 unquoted, and IFS is null, split the results of the previous steps
2487 on $' \t\n' instead of just ' '. This relies on the previous steps
2488 quoting the portions of the word that should not be split. Fixes
2489 bug reported by Kevin Brodsky <corax26@gmail.com>
2490
2491 expr.c
2492 - evalexp: after running expr_unwind, make sure we reset expr_depth
2493 to 0 for the next call
2494 - expr_streval: if after a call to get_array_value (which can call
2495 the expression evaluator recursively) we discover that expr_depth
2496 is less than it was before we called it, we assume there has been
2497 some kind of error and an expr_unwind, so we treat it as an
2498 error and either longjmp back to the expression top level or return
2499 0 immediately. Fixes bug reported by Eduardo Bustamante
2500 <dualbus@gmail.com>
2501
2502 6/23
2503 ----
2504 doc/{bash.1,bashref.texi}
2505 - add text noting that $* and ${array[*]} (unquoted) can also expand
2506 to multiple words
2507
2508 6/29
2509 ----
2510 general.[ch]
2511 - default_columns: new function, returns the value of COLUMNS, or
2512 refreshes it if check_window_size is set and COLUMNS is unset. By
2513 default, it returns 80
2514
2515 execute_cmd.c
2516 - select_query: use default_columns() instead of fetching value of
2517 COLUMNS directly
2518
2519 builtins/help.def
2520 - show_builtin_command_help: use default_columns() instead of fetching
2521 value of COLUMNS directly
2522
2523 6/30
2524 ----
2525 builtins/read.def
2526 - read_builtin: call QUIT during the read loop, just in case we get a
2527 signal we should act on that didn't cause read to be interrupted.
2528 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1466737
2529 - read_builtin: if -n or -N is supplied with a 0 argument, try a zero-
2530 length read to detect errors and return failure if that read returns
2531 a value < 0. Suggested by dualbus@gmail.com
2532
2533 7/4
2534 ---
2535 bashhist.c
2536 - maybe_add_history: keep track of whether the current line is a shell
2537 comment, even if we're not adding it because it's in a multi-line
2538 command, so we use appropriate delimiters between it and any
2539 subsequent lines. Fixes bug reported by Grisha Levit
2540 <grishalevit@gmail.com> back on 2/28/2017
2541
2542 bashline.c
2543 - operate_and_get_next: if given an explicit argument, use that to
2544 choose which line in the history to use.
2545
2546 lib/readline/doc/rluser.texi,doc/bash.1
2547 - operate-and-get-next: document new effect of explicit numeric arg
2548
2549 lib/readline/complete.c
2550 - fnprint: make sure print_len is initialized before using it on
2551 systems without multibyte character support. Report and fix from
2552 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2553
2554 7/6
2555 ---
2556 builtins/printf.def
2557 - PRETURN,printf_builtin: check variable returned by bind_printf_variable,
2558 return failure if that indicates we can't perform an assignment
2559 because the variable is marked readonly or noassign. Fixes bug
2560 reported by Arnaud Gaillard <arnaud.mgaillard@gmail.com>
2561
2562 7/7
2563 ---
2564 lib/readline/text.c
2565 - rl_quoted_insert: new feature: a negative argument means to insert
2566 the next -COUNT characters using quoted-insert. Original feature
2567 from Jason Hood <jadoxa@yahoo.com.au>. Still needs work on
2568 redisplay
2569 - _rl_insert_next_callback: implement support for negative arguments
2570 similar to rl_quoted_insert: we just insert one at a time and keep
2571 increasing the count until it hits 0
2572
2573 lib/readline/misc.c
2574 - _rl_arg_callback: if the return value from _rl_arg_dispatch indicates
2575 we should keep reading a numeric argument, update the message with
2576 the new arg value
2577
2578 7/8
2579 ---
2580 lib/readline/signals.c
2581 - _rl_handle_signal: make sure all uses of any of the job control
2582 signals are protected by a check for SIGTSTP being defined. Report
2583 from Juan Manuel Guerrero <juan.guerrero@gmx.de>
2584
2585 7/11
2586 ----
2587 lib/readline/vi_mode.c
2588 - rl_vi_replace: when making the new keymap for vi replacement mode,
2589 make sure that ANYOTHERKEY is set correctly, otherwise some input
2590 will cause _rl_dispatch to return -2 to the top level. Fixes fuzzing
2591 bug reported by Ben Wong <benjamin.a.wong@gmail.com>
2592
2593 7/19
2594 ----
2595 builtins/read.def
2596 - struct ttsave: make the attrs member a struct, not a pointer, to force
2597 a structure copy that will survive a longjmp to another context.
2598 Leaving it as a pointer to a local struct is not portable
2599
2600 9/10
2601 ----
2602 execute_cmd.c
2603 - execute_builtin: make sure that we set up the unwind-protect for
2604 pop_scope (temporary_env is non-zero) so that the temporary env
2605 is propagated to the current environment only for special builtins
2606 (source/eval/unset) not run by the command builtin
2607 (flags & CMD_COMMAND_BUILTIN == 0). Fixes bug reported by
2608 Martijn Dekker <martijn@inlv.org>
2609
2610 9/17
2611 ----
2612 builtins/printf.def
2613 - asciicode: don't use mblen to check whether or not a character is a
2614 valid multibyte character; use mbtowc right away and then inspect
2615 the return value. Fixes bug reported by Stephane Chazelas
2616 <stephane.chazelas@gmail.com>
2617
2618 9/27
2619 ----
2620 {jobs,subst}.h
2621 - move declaration of last_command_subst_pid to subst.h, since it's
2622 declared in subst.c and doesn't depend on job control. Reported by
2623 Martijn Dekker <martijn@inlv.org>
2624
2625 builtins/read.def,variables.c
2626 - fixed a couple of problems (READLINE, ARRAY_VARS) that prevented
2627 the minimal config from building
2628
2629 10/1
2630 ----
2631 parse.y
2632 - special_case_tokens: if we are returning DO in a case where the last
2633 two tokens read are `FOR' and `WORD' make sure we decrement
2634 expecting_in_token. Fixes bug reported by Martijn Dekker
2635 <martijn@inlv.org>
2636
2637 10/4
2638 ----
2639 subst.c
2640 - expand_string_for_rhs: now takes an additional PFLAGS argument from
2641 its caller (one so far); passes that through to call_expand_word_internal
2642 as W_ASSIGNRHS. Fixes bug reported by Martijn Dekker
2643 <martijn@inlv.org>
2644 - expand_string_for_rhs: expanding b in ${a[:]=b} is now done as if
2645 b were the rhs of an assignment statement. This means that splitting
2646 isn't done, but tilde expansion is performed as if the statement
2647 were `a=b'. Fixes splitting bug with $* reported by Martijn Dekker
2648 <martijn@inlv.org>
2649
2650 command.h
2651 - W_NOASSNTILDE: new word flag, means to not perform tilde expansion
2652 following a `:' even if the word has the W_ASSIGNRHS flag enabled
2653
2654 subst.c
2655 - expand_word_internal: if we see a `:' with the W_NOASSNTILDE flag
2656 set, just add the character and inhibit any subsequent tilde
2657 expansion. Currently not set anywhere, but it could be set in
2658 expand_string_for_rhs to satisfy its peculiar semantics
2659
2660 10/6
2661 ----
2662 lib/sh/casemod.c
2663 - sh_modcase: convert even single-byte wide characters to wide upper
2664 or lowercase equivalents to accommodate locales where single-byte
2665 characters have multibyte upper and lower case conversions. Bug
2666 reported by Stephane Chazelas <stephane.chazelas@gmail.com>
2667
2668 10/7
2669 ----
2670 doc/{bash.1,bashref.texi}
2671 - slight changes to the description of command_not_found_handle to
2672 clarify that it's executed in a separate execution environment,
2673 just like if the command was found. Reported by Martijn Dekker
2674 <martijn@inlv.org>
2675
2676 10/8
2677 ----
2678 lib/readline/doc/{history.3,hstech.texi}
2679 - history_get: clarify the range of valid values for the OFFSET
2680 argument. From a report by Kevin Ryde <user42_kevin@yahoo.com.au>
2681
2682 10/21
2683 -----
2684 subst.c
2685 - expand_string_for_rhs: set W_NOASSNTILDE if the operator is `='
2686 for backwards compatibility with bash-4.4
2687
2688 shell.c
2689 - main: set positional parameters before running the startup files,
2690 so the startup files can inspect $@. Often-requested feature,
2691 most recently from Stephane Chazelas <stephane.chazelas@gmail.com>
2692
2693 10/27
2694 -----
2695 doc/{bash.1,bashref.texi}
2696 - Arrays: add some clarifying language to make it clear that array
2697 references that don't use the ${a[s]} syntax are subject to
2698 globbing when passed as arguments to commands such as unset, and
2699 should be quoted for safety. Change prompted by a report from
2700 Eli Barzilay <eli@barzilay.org>
2701
2702 parse.y
2703 - parse_comsub: make sure we don't run off the end of the `ret'
2704 buffer when checking for the here doc delimiter. Report from
2705 Jakub Wilk <jwilk@jwilk.net>, the result of a fuzzing test. Pointer
2706 to place for the fix from Eduardo Bustamante <dualbus@gmail.com>
2707
2708 10/30
2709 -----
2710 builtins/pushd.def
2711 - get_directory_stack: make sure the current directory (element 0 of
2712 the stack) is passed to polite_directory_format under the same
2713 conditions as the rest of the stack entries (flags & 1). Otherwise
2714 something like `cd ${DIRSTACK[0]}' will fail. Fixes bug reported
2715 by Steve Jones <sjml@slohj.org>
2716
2717 builtins/declare.def
2718 - declare_internal: when checking for a `[' to see whether or not this
2719 is an array variable declaration (declare -a foo[12]), make sure
2720 we don't do the check if we're just dealing with shell functions.
2721 Bug and pointer to fix from PJ Eby <pje@telecommunity.com>
2722
2723 11/1
2724 ----
2725 parse.y
2726 - parse_comsub: if we read a four-character word followed by a break
2727 character, and that word is not one of the reserved words, set
2728 lex_rwlen to 0 since we are no longer in a reserved word. It only
2729 hurts if another break character immediately follows, so that test
2730 succeeds again. Turn off the RESWDOK flag only if it's not a shell
2731 metacharacter, too. Fixes bug reported by Kjetil Torgrim Homme
2732 <kjetilho@scribus.ms.redpill-linpro.com>
2733
2734 11/3
2735 ----
2736 lib/readline/isearch.c
2737 - _rl_isearch_dispatch: if we are searching in reverse order, let
2738 sline_index go to -1 to avoid searching the same line twice. It
2739 gets reset right after that, so there's no danger of indexing into
2740 the history line with a negative index.
2741
2742 11/7
2743 ----
2744 execute_cmd.c
2745 - time_command: only restore command->flags if CODE indicates we didn't
2746 perform a longjmp back to top_level. If we did, `command' has already
2747 been freed. Fixes bug reported on savannah by
2748 ukuvbu oibws <xyzdr4gon333@googlemail.com>
2749 https://savannah.gnu.org/support/?109403
2750
2751 11/10
2752 -----
2753 lib/sh/unicode.c
2754 - u32cconv: make sure to initialize localconv to -1 (error) in case
2755 we switch from a utf-8 locale to something else and call
2756 iconv_close. Report from Egmont Koblinger <egmont@gmail.com>; fix
2757 from Eduardo Bustamante <dualbus@gmail.com>
2758
2759 11/16
2760 -----
2761 subst.c
2762 - parse_comsub: istring_index should be a size_t to avoid integer
2763 overflow when allocating large pieces of memory. Report and fix
2764 from Siteshwar Vashisht <svashisht@redhat.com>, originally based on
2765 http://lists.gnu.org/archive/html/bug-bash/2017-11/msg00047.html
2766
2767 11/24
2768 -----
2769 lib/readline/bind.c
2770 - rl_empty_keymap: new public function, returns non-zero if there are
2771 no keys bound in the keymap passed as an argument
2772
2773 lib/readline/readline.h
2774 - rl_empty_keymap: new public extern declaration
2775
2776 lib/readline/doc/rltech.texi
2777 - rl_empty_keymap: document new function
2778
2779 lib/readline/bind.c
2780 - rl_generic_bind: keep track of the previous keymap and previous
2781 index in a multi-key key sequence so we can remove an empty terminal
2782 keymap and remove a previous override to ANYOTHERKEY. Right now,
2783 this only works for one previous keymap level. Inspired by a report
2784 from Clark Wang <dearvoid@gmail.com>
2785
2786 11/25
2787 -----
2788 lib/readline/display.c
2789 - _rl_update_final: make sure that computing the length of the visible
2790 bottom line (botline_length) takes any invisible characters in the
2791 prompt into account (woff). This value is used as part of the check
2792 whether or not we want to remove the line-wrapping indicator on
2793 terminals like xterm
2794 - _rl_update_final: when removing the line-wrapping indicator on xterm,
2795 make sure we take invisible characters in the prompt (woff) into
2796 account when computing the character in the rightmost physical
2797 screen position. Fixes cosmetic line-wrapping issue reported by
2798 Egmont Koblinger <egmont@gmail.com>
2799
2800 11/27
2801 -----
2802 lib/sh/ufuncs.c
2803 - fsleep: if using select to implement sleep, use restart after
2804 a signal interrupts the select and handle pending signals. If
2805 pselect is available, use that instead and block SIGCHLD while
2806 pselect is executing.
2807 Fixes report from Thiruvadi Rajaraman <trajaraman@mvista.com>
2808
2809 11/28
2810 -----
2811 lib/readline/signals.c
2812 - rl_check_signals: new public function: a wrapper for RL_CHECK_SIGNALS
2813 that can be used by applications that install a wrapper for
2814 rl_getc (rl_getc_function) so they can respond to signals that
2815 arrive while waiting for input in the same way as rl_getc. The app
2816 can use rl_pending_signal() to get the most recently-received
2817 signal. From a discussion about Gnuplot initiated by
2818 Rin Okuyama <rokuyama@rk.phys.keio.ac.jp>
2819
2820 lib/readline/readline.h
2821 - rl_check_signals: new extern declaration
2822
2823 lib/readline/doc/rltech.texi
2824 - rl_check_signals: document new public function
2825
2826 variables.c
2827 - set_pwd: test for and force an inherited OLDPWD to be a directory
2828 if OLDPWD_CHECK_DIRECTORY is defined in config-top.h (it is by
2829 default). Issue raised by Mikulas Patocka <mikulas@twibright.com>
2830
2831 config-top.h
2832 - OLDPWD_CHECK_DIRECTORY: new define, defined to 1 by default
2833
2834 11/29
2835 -----
2836 Makefile.in
2837 - pathexp.o: add dependencies on libintl.h. Reported by
2838 Ross Burton <ross@burtonini.com>
2839
2840 12/1
2841 ----
2842 lib/sh/ufuncs.c
2843 - fsleep: add blocking and releasing SIGCHLD using sigprocmask
2844 around call to select(2) even if pselect(2) is not available
2845
2846 12/3
2847 ----
2848 execute_cmd.c
2849 - coproc_setstatus: new utility function, take a pointer to a coproc
2850 and a status and mark the coproc as dead and having been reaped
2851 with that status. Used by child processes who want to invalidate
2852 the coproc's pid
2853
2854 12/5
2855 ----
2856 subst.c
2857 - process_substitute: instead of just having a flag to denote that a
2858 file descriptor is connected to a process substitution, store the
2859 pid of the child process (still needs work)
2860 - find_procsub_child,set_procsub_status,reap_procsubs: utility
2861 functions to allow the job control code to detect that a process
2862 substitution child has died and deallocate the file descriptors
2863 or pathname
2864
2865 subst.h
2866 - find_procsub_child,set_procsub_status,reap_procsubs: extern
2867 declarations
2868
2869 nojobs.c
2870 - set_pid_status: if we are reaping a process substitution, call
2871 set_procsub_status to record the fact
2872
2873 jobs.c
2874 - waitchld: if we are reaping a process substitution, call
2875 set_procsub_status to record the fact. Doesn't really do anything
2876 yet
2877
2878 12/6
2879 ----
2880 execute_cmd.c
2881 - execute_command: don't call unlink_fifo_list if we're in the
2882 middle of executing a list of commands (executing_list != 0).
2883 Partial fix for bug reported by Stephane Chazelas
2884 <stephane.chazelas@gmail.com>
2885 - execute_simple_command: don't close process substitution file
2886 descriptors in the parent after forking children in a pipeline;
2887 defer until pipeline completes, since parent may have inherited
2888 fds from a calling scope (e.g., via `.'). EXPERIMENTAL
2889 - execute_disk_command: don't close process substitution file
2890 descriptors in the parent after forking the child. EXPERIMENTAL
2891
2892 12/7
2893 ----
2894 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
2895 - show-mode-in-prompt: clarify that this must be enabled before the
2896 vi and emacs mode strings are prefixed to the prompt. Report from
2897 Rob Foehl <rwf@loonybin.net>
2898
2899 12/8
2900 ----
2901 execute_cmd.c
2902 - execute_coproc: don't warn about an existing coproc if the write and
2903 read file descriptors are unusable (-1), as they will be after a
2904 call to coproc_closeall in a subshell. Fixes spurious warning
2905 reported by Tobias Hoffmann <lfile-list@thax.hardliners.org>
2906
2907 jobs.c
2908 - bgp_resize: avoid overflow when calculating the new size if the
2909 child process limit is something ridiculously large. Report and
2910 fix from Natanael Copa <ncopa@alpinelinux.org>
2911
2912 execute_cmd.c
2913 - execute_builtin_or_function: if we return via the return builtin, we
2914 don't get a chance to free the saved fifo list, so add an unwind-
2915 protect to make sure it happens. Part of fix for leak reported by
2916 Oyvind Hvidsten <oyvind.hvidsten@dhampir.no>
2917 - execute_command_internal: if we unwind via the return builtin (e.g.,
2918 we execute a function which then returns via the return builtin to
2919 a previous function), we don't free the saved fifo list, so add an
2920 unwind-protect to make sure the free happens. Rest of fix for leak
2921 reported by Oyvind Hvidsten <oyvind.hvidsten@dhampir.no>
2922
2923 subst.c
2924 - add_fifo_list: for the FIFO case (no /dev/fd), make sure we
2925 initialize the new members of the fifo list after xrealloc
2926
2927 12/9
2928 ----
2929 subst.c
2930 - dev_fd_list: now a list of type `pid_t' so we can store process
2931 associated with the pipe fd into the right element; change all
2932 necessary functions (copy_fifo_list, add_fifo_list)
2933 - process_substitute: store pid of child process into the right
2934 index in dev_fd_list after opening the pipe. Process ID of -1 means
2935 process has been reaped and fd needs to be closed (or FIFO needs to
2936 be unlinked); value of 0 means slot is unused
2937
2938 jobs.c
2939 - wait_for_background_pids: call reap_procsubs to make sure we clean
2940 up all reaped process substitutions before trying to wait for
2941 everything (still needs work)
2942
2943 tests/{run-procsub,procsub.{tests,right}}
2944 - new file, tests of process substitution that have failed in the past
2945
2946 12/10
2947 -----
2948 jobs.c
2949 - wait_for_background_pids: warn if one of the jobs is stopped
2950
2951 subst.c
2952 - wait_procsubs: new function, call wait_for for every "live" process
2953 substitution
2954
2955 jobs.c
2956 - wait_for_background_pids: call wait_procsubs to reap any living
2957 process subsitutions
2958
2959 12/13
2960 -----
2961 lib/readline/bind.c
2962 - parser_if: add support for testing the readline version, using the
2963 full set of arithmetic comparison operators (and supporting both
2964 = and ==), using version numbers of the form major[.[minor]]
2965
2966 12/14
2967 -----
2968 subst.[ch]
2969 - string_list_dollar_star: now takes QUOTED and PFLAGS arguments like
2970 string_list_dollar_at, changed all callers. Not used yet.
2971
2972 12/16
2973 -----
2974 subst.c
2975 - param_expand: broke out cases of expanding unquoted (quoted == 0)
2976 $* on the rhs of an assignment statement (pflags & PF_ASSIGNRHS)
2977 with various values of IFS (unset, null, set to non-null value) to
2978 capture the expansion subtleties. From a report back on 11/24 by
2979 Martijn Dekker <martijn@inlv.org>
2980
2981 12/17
2982 -----
2983 array.h
2984 - set_element_value: new define, sets array element AE to VALUE
2985
2986 variables.c
2987 - set_pipestatus_array: use set_element_value where appropriate
2988
2989 12/18
2990 -----
2991 subst.c
2992 - parameter_brace_find_indir: when expanding the indirect parameter
2993 to find the eventual variable name, we don't perform word splitting.
2994 Make sure this does the right thing for * and @. Fixes bug
2995 reported by isabella parakiss <izaberina@gmail.com>
2996
2997 12/19
2998 -----
2999 doc/{bash.1,bashref.texi}
3000 - indirect expansion: make sure to note that the value of the indirect
3001 variable does not undergo word splitting as one of its expansions,
3002 as in fix from 12/18
3003
3004 12/22
3005 -----
3006 subst.c
3007 - parameter_brace_expand_rhs: make sure the value this function returns
3008 when OP is `=' is quoted appropriately, as the callers expect. More
3009 changes from Posix interp 221. Fixes report from Martijn Dekker
3010 <martijn@inlv.org>
3011
3012 variables.c
3013 - assign_hashcmd: if running in a restricted shell, make sure the
3014 target of the hash assignment can be found via a $PATH search, to
3015 prevent users assigning commands to the hash table they would not
3016 ordinarily have access to. Fixes issue raised by Drew Parker
3017 <andrew.s.parker2@gmail.com>
3018
3019 builtins/hash.def
3020 - hash_builtin: if running in a restricted shell, make sure the
3021 pathname target of `hash -p' can be found via a $PATH search, to
3022 prevent users assigning commands to the hash table they would not
3023 ordinarily have access to.
3024
3025 12/27
3026 -----
3027 array.c,arrayfunc.c,...
3028 - many changes to clean up unused variables and functions. From a
3029 report from Siteshwar Vashisht <svashisht@redhat.com>
3030
3031 12/28
3032 -----
3033 lib/readline/terminal.c
3034 - _rl_term_clrscroll: save the `E3' termcap capability, which clears
3035 the scrollback buffer where supported. Unused right now
3036
3037 lib/readline/rlprivate.h
3038 - _rl_term_clrscroll: extern declaration
3039
3040 lib/readline/bind.c
3041 - parser_if: added simple variable comparison capability. Allowable
3042 operators are `=', `==', and `!='; boolean variables must be
3043 compared to either `on' or `off'; variable names must be separated
3044 from the operator by whitespace
3045
3046 doc/bash.1,lib/readline/doc/{rluser.texi,readline.3}
3047 - document new `if variable comparison value' construct
3048
3049 1/2/2018
3050 --------
3051 lib/glob/sm_loop.c
3052 - EXTMATCH: when matching against !(patlist), if a filename beginning
3053 with a `.' does not match any of the patterns in patlist, don't
3054 return it as a match if leading dots need to be matched explicitly
3055 (flags & FNM_PERIOD). Report from Eric Cook <llua@gmx.com>
3056
3057 1/3
3058 ---
3059 variables.[ch]
3060 - bind_function_def: takes an additional flags argument. If FLAGS&1,
3061 overwrite any existing function_def hash table entry; if FLAGS==0,
3062 leave any existing function_def alone.
3063
3064 make_cmd.c
3065 - make_function_def: call bind_function_def with flags == 0
3066
3067 execute_cmd.c
3068 - execute_intern_function: call bind_function_def with flags == 1 so
3069 we have function_def information that's correct for where the
3070 function is defined, not just where it's last parsed. Fixes report
3071 from Bruno Vasselle <bruno.vasselle@laposte.net>; final piece of
3072 fix from 12/15/2011
3073
3074 1/4
3075 ---
3076 subst.c
3077 - param_expand: deal with string_list_dollar_star returning NULL.
3078 Fixes bug reported by Martijn Dekker <martijn@inlv.org>
3079
3080 builtins/history.def
3081 - history_builtin: enabled code that performs range deletion
3082
3083 1/5
3084 ---
3085 subst.c
3086 - do_assignment_internal: if performing a compound assignment, make
3087 sure to pass ASS_CHKLOCAL flag to do_compound_assignment if the
3088 assignment word has the W_CHKLOCAL flag set
3089 - do_compound_assignment: honor ASS_CHKLOCAL flag and check for an
3090 existing local variable before creating or modifying a global
3091 variable
3092
3093 builtins/declare.def
3094 - declare_internal: new (undocumented so far) option: -G. Means to
3095 act on global variables (create, modify) if no local variable is
3096 found with the specified name
3097 - declare_find_variable: new declare-specific wrapper functon for
3098 declare builtin; obeys -g and -G options in one place
3099 - declare_internal: if no variable is found after following any nameref
3100 chain, look up the variable using declare_find_variable to honor the
3101 -G option. XXX - so far, this is the only place that function is used
3102
3103 subst.c
3104 - shell_expand_word_list: before calling make_internal_declare, add
3105 'G' to the options list if W_CHKLOCAL is set in the word's flags.
3106 This makes builtins like `readonly' that modify local variables in
3107 a function behave the same for scalar and array variables
3108
3109 1/11
3110 ----
3111 parse.y
3112 - shell_getc: move code that decides whether to append a space to an
3113 alias expansion here from mk_alexpansion, so we can inhibit adding
3114 a space if we're currently parsing a single or double quoted string
3115
3116 1/12
3117 ----
3118
3119 parse.y
3120 - clear_string_list_expander: take a pointer to an alias that's about
3121 to be freed and make sure there aren't any pointers to it in the
3122 list of pushed strings. If there are, zero it out in the pushed
3123 string list to avoid referencing freed memory in pop_string()
3124
3125 alias.c
3126 - free_alias_data: if an alias being freed is currently being expanded,
3127 call clear_string_list_expander to remove references to it from the
3128 list of pushed strings
3129
3130 1/14
3131 ----
3132 pcomplib.c
3133 - progcomp_search: add code to look up an alias for the CMD argument
3134 and return the completions for the first word of that alias if one
3135 is found. Just a start at completing aliases, a much-requested
3136 feature
3137
3138 pcomplete.h
3139 - COPT_LASTUSER: last flag value used by user-settable completion
3140 options
3141 - PCOMP_RETRYFAIL, PCOMP_NOTFOUND: new #defines, possible return values
3142 from programmable_completions in FOUNDP argument. Moved RETRYFAIL
3143 define here from pcomplete.c to avoid collisions with user-settable
3144 option values (COPT_*)
3145
3146 1/15
3147 ----
3148 pcomplete.c
3149 - programmable_completions: if we don't find any completions for a
3150 command, and RETRY is 0, see if the command is a defined alias,
3151 expand it, and try to expand the first word of the value as a
3152 command, and find any programmable completions for it. Here right
3153 now, could be moved to attempt_shell_completion later if we need
3154 to do more analysis of the expanded line. We'll see how it works
3155 in practice. (Disabled for now.)
3156
3157 1/16
3158 ----
3159 parse.y
3160 - grammar: when timing the null command, make sure to turn off the
3161 flags in parser_state (PST_REDIRLIST) that make_simple_command sets
3162 when given a NULL second argument, since it assumes that it's going
3163 to turn those off when it gets the next word of the simple command
3164 (which it never gets in this case). Fixes bug reported by
3165 Anti Räis <antirais@gmail.com>
3166
3167 1/19
3168 ----
3169 lib/readline/rltty.c
3170 - prepare_terminal_settings (termios/termio): if there is a function
3171 bound to the VDISCARD character in the current keymap, set VDISCARD
3172 to _POSIX_VDISABLE while readline is active. From a report from
3173 Rhialto <rhialto@falu.nl>
3174
3175 1/22
3176 ----
3177 builtins/history.def
3178 - histtime: check whether or not localtime() returns NULL, and make
3179 sure we only call strftime() with a valid struct tm. This can happen
3180 when the timestamps in the history file overflow a time_t. Fixes bug
3181 reported by Luke Dashjr <luke@dashjr.org>
3182
3183 bashline.c
3184 - edit_and_execute_command: if we're in vi editing mode, make sure
3185 we end up in insert mode after executing the commands from the
3186 edited file. This seems to be what other shells do. Report from
3187 Stan Marsh <gazelle@xmission.com>
3188
3189 1/26
3190 ----
3191 bashline.c
3192 - command_word_completion_function: match alias and shell function
3193 names case-insensitively if the readline completion-ignore-case
3194 variable is set. Inspired by report from <odnehel@gmail.com>
3195
3196 lib/readline/display.c
3197 - update_line: when performing a dumb update after wrapping the line
3198 (usually due to printing the prompt), make sure we adjust
3199 _rl_last_c_pos if there are invisible characters in prompt lines
3200 other than the first (we assume those invisible characters are in
3201 the last line, which is nearly always the case). We adjust by the
3202 total number of invisible chars less the number of invisible chars
3203 in the first prompt line. From a report in
3204 https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1745273
3205
3206 execute_cmd.c
3207 - execute_command_internal: if redirections attached to a compound
3208 command fail, make sure we discard the `internal_fifos' unwind-
3209 protect frame after freeing the copied fifo_list and before returning
3210
3211 1/30
3212 ----
3213 lib/readline/rlprivate.h
3214 - BRACK_PASTE_FINI: add \r to the end of the string to avoid problems
3215 with the tty driver thinking the cursor was in the wrong position.
3216 Fixes issue reported by Egmont Koblinger <egmont@gmail.com>
3217
3218 1/31
3219 ----
3220 lib/sh/zread.c
3221 - zread,zreadintr: call check_signals() before calling read() to
3222 minimize the race window between signal delivery, signal handling,
3223 and a blocking read(2). Partial fix for FIFO read issue reported by
3224 Oyvind Hvidsten <oyvind.hvidsten@dhampir.no>
3225
3226 doc/{bash.1,bashref.texi}
3227 - shopt: document `assoc_expand_once' shell option
3228
3229 2/1
3230 ---
3231 config-top.h
3232 - DONT_REPORT_SIGTERM: define, so non-interactive shells will no
3233 longer print termination messages for child processes killed by
3234 SIGTERM
3235
3236 2/6
3237 ---
3238 lib/readline/text.c
3239 - rl_insert: don't attempt to optimize typeahead if we are only reading
3240 a fixed number of characters (rl_num_chars_to_read > 0)
3241
3242 redir.c
3243 - redir_special_open: if the shell is restricted, return a
3244 RESTRICTED_REDIRECT error for attempts to open /dev/tcp and /dev/udp
3245 sockets. Inspired by report from Blake Burkhart <bburky@bburky.com>
3246 - do_redirection_internal: if redir_open returns RESTRICTED_REDIRECT,
3247 return that right away (instead of errno) so we can print a better
3248 error message
3249
3250 2/11
3251 ----
3252 jobs.c
3253 - bgp_resize: fix problems with (pid_t) overflow when calculating new
3254 size for table when js.c_childmax is near the limit of a pid_t
3255 (e.g., 2**31 - 1 on a 32-bit system, or 2**63-1 on a system with
3256 32-bit pid_t). Fixes hang reported by Natanael Copa
3257 <ncopa@alpinelinux.org> based on his patch from 12/8.
3258 - bgp_resize: cap max table size for bgpids at MAX_CHILD_MAX (32768)
3259
3260 include/typemax.h
3261 - TYPE_MINIMUM, TYPE_MAXIMUM: updated definitions from coreutils-8.29,
3262 silences some compiler warnings
3263
3264 2/14
3265 ----
3266 Makefile.in
3267 - maybe-clean: use cd and pwd -P to test whether or not two directory
3268 names identical, since topdir = '.' and BUILD_DIR = full pathname
3269 when you use something like `bash ./configure'. Problem reported by
3270 Michael Felt <aixtools@gmail.com>
3271
3272 subst.c
3273 - split_at_delims: if SD_NOQUOTEDELIM is in the flags argument, don't
3274 treat `'' and `"' as candidates for possible sequences of delimiters,
3275 even if they're part of the delimiter set (the delims argument).
3276 Fixes problem with completing lines like `foo --bar='quux baz' xx'
3277 reported by Nick Patavalis <npat@efault.net>
3278
3279 2/15
3280 ----
3281 copy_cmd.c
3282 - copy_word_list: build the list in the right order, avoiding having
3283 to reverse it at the end. Helps with long argument lists
3284
3285 shell.c
3286 - bind_args: build the argument list in the right order, avoiding
3287 having to reverse it at the end.
3288 - bind_args: only call push_args to save argc and argv as BASH_ARGC
3289 and BASH_ARGV if debugging mode is enabled (debugging_mode != 0).
3290 Inspired by report from Ambrose Feinstein <ambrose@google.com>
3291 - bind_args: note that we've saved BASH_ARGC and BASH_ARGV by setting
3292 bash_argv_initialized
3293 - shell_reinitialize: reset bash_argv_initialized back to 0 so
3294 BASH_ARGV and BASH_ARGC will be recreated if we're in debugging mode
3295
3296 variables.c
3297 - save_bash_argv: new function, initializes BASH_ARGV and BASH_ARGC
3298 from the saved positional parameters
3299 - init_bash_argv: initialize BASH_ARGV and BASH_ARGC if
3300 bash_argv_initialized == 0
3301
3302 builtins/shopt.def
3303 - shopt_set_debug_mode: if we're turning on debug mode, initialize
3304 BASH_ARGC and BASH_ARGV if bash_argv_initialized == 0
3305
3306 2/16
3307 ----
3308 execute_cmd.c
3309 - execute_function: make sure BASH_ARGV and BASH_ARGC are initialized
3310 before calling push_args (and before calling remember_args)
3311
3312 builtins/source.def
3313 - source_builtin: make sure BASH_ARGV and BASH_ARGC are initialized
3314 before calling push_args (and before calling remember_args)
3315
3316 builtins/evalfile.c
3317 - _evalfile: if the shell compatibility level is 44 or lower, make
3318 sure BASH_ARGV and BASH_ARGC are initialized before calling
3319 array_push
3320
3321 builtins/shopt.def
3322 - compat44: new shell option. This will be the last compatXX option
3323
3324 doc/{bash.1,bashref.texi}
3325 - compat44: document new shell option
3326
3327 2/21
3328 ----
3329 builtins/common.h
3330 - ISOPTION: check s[1] before s[2] to avoid out of bound reads. Fixes
3331 bug reported by jeremy@feusi.co
3332
3333 input.h
3334 - B_SHAREDBUF: new flag for buffered input fds, indicates that this
3335 fd shares its b_buffer with another fd
3336
3337 input.c
3338 - duplicate_buffered_stream: when duplicating *from* the buffer
3339 corresponding to bash input, make sure the new buffer has B_SHAREDBUF
3340 in the flags, because copy_buffered_stream copies pointers
3341 - duplicate_buffered_stream: if the buffer being copied to has the
3342 B_SHAREDBUF flag set, make sure the b_buffer doesn't get freed.
3343 Fixes use-after-free bug reported by jeremy@feusi.co
3344 - save_bash_input,close_buffered_stream: make sure a buffer with
3345 B_SHAREDBUF set has its b_buffer set to NULL before calling
3346 free_buffered_stream
3347
3348 2/24
3349 ----
3350 subst.c
3351 - parameter_brace_expand_error: add parameter saying whether or not
3352 we are checking whether value is null, so we can have different
3353 error messages for ${x:?} and ${x?}. Report and fix from
3354 don fong <dfong@dfong.com>
3355
3356 3/5
3357 ---
3358 lib/readline/bind.c
3359 - _rl_read_file: instead of calling stat/open on the passed filename,
3360 use open/fstat to avoid one possible filename translation and close
3361 a small (benign) race condition. Report and fix from Roy Ivy
3362 <roy.ivy.iii@gmail.com>
3363
3364 3/11
3365 ----
3366 variables.c
3367 - makunbound: if new variable localvar_unset is non-zero, mark local
3368 vars in previous scopes as invisible and unset so they will show
3369 up as unset until that previous scope returns (similar to how local
3370 variables in the current local scope are handled). localvar_unset
3371 is currently set to 0 with no way for a script to change its value.
3372 Eventually there will be an option to modify it. From a bug-bash
3373 discussion started by Nikolai Kondrashov <spbnick@gmail.com> back
3374 on 2/11/2018
3375
3376 3/13
3377 ----
3378 subst.c
3379 - expand_word_list_internal: short-circuit and exit right away if a
3380 variable assignment preceding a special builtin fails in posix mode
3381 - expand_word_list_internal: if a variable assignment precedes an
3382 empty command name (after expansion), fix to exit right away when
3383 the shell is in posix mode
3384
3385 3/15
3386 ----
3387 doc/{bash.1,bashref.texi}
3388 - Add text to Pathname Expansion clarifying that a slash must be
3389 matched by a slash in the pattern when matching pathnames, but
3390 not in other matching contexts. Suggested by <stormy1777@yahoo.com>
3391
3392 builtins/common.c
3393 - read_octal: allow octal numbers greater than 777 to accommodate
3394 modes and umasks that include sticky/setuid/setgid bits. Report
3395 and fix from Martijn Dekker <martijn@inlv.org>
3396
3397 3/19
3398 ----
3399 lib/readline/bind.c
3400 - rl_generic_bind: make sure we only assign to prevkey in the loop
3401 if the key sequence index is > 0, so ic is valid. Fixes bug
3402 reported by Koichi Murase <myoga.murase@gmail.com>
3403
3404 builtins/read.def
3405 - read_builtin: be slightly less aggressive checking for timeouts and
3406 SIGALRM: if we successfully read a character, don't check for a
3407 timeout until we store or process it. Fixes timing problem
3408 reported by Rob Foehl <rwf@loonybin.net>
3409
3410 3/22
3411 ----
3412 sig.c
3413 - termsig_handler: add a call to exit(1) after the kill, just in case
3414 there are circumstances where the SIG_DFL signal handler is
3415 ignored. Report from Andrei Vagin <avagin@gmail.com>
3416
3417 3/25
3418 ----
3419 lib/readline/bind.c
3420 - _rl_function_of_keyseq_internal: new internal function thta takes a
3421 length parameter to accommodate NUL in the key sequence. Patch from
3422 Koichi Murase <myoga.murase@gmail.com>
3423 - rl_function_of_keyseq_len: new application-callable function that
3424 takes a length parameter; otherwise equivalent to rl_function_of_keyseq.
3425
3426 lib/readline/readline.h
3427 - rl_function_of_keyseq_len: add extern declaration for new function
3428
3429 lib/readline/doc/rltech.texi
3430 - rl_function_of_keyseq_len: document new function interface
3431
3432 bashline.c
3433 - bash_execute_unix_command: use rl_function_of_keyseq_len to handle
3434 key sequences with embedded NULs (\C-@). Fix from Koichi Murase
3435 <myoga.murase@gmail.com>
3436
3437 lib/readline/bind.c
3438 - rl_bind_key_if_unbound,rl_bind_key_if_unbound_in_map: run the KEY
3439 argument through rl_untranslate_keyseq to produce a symbolic sequence
3440 that can encode \C-@.
3441 - rl_bind_keyseq_if_unbound_in_map: translate the key sequence in order
3442 to accommodate symbolic key sequences; should be a no-op for `raw'
3443 key sequences such as the arrow key seqeunces from terminfo. Change
3444 from Koichi Murase <myoga.murase@gmail.com>
3445
3446 4/2
3447 ---
3448 jobs.c
3449 - wait_for: when setting the SIGINT signal handler to wait_sigint_handler
3450 make sure we're not setting old_sigint_handler recursively, as we
3451 can when running an external command in a trap we took after a
3452 command exited due to SIGINT. We don't want to overwrite
3453 old_sigint_handler here. Fixes bug reported by Dr. Werner Fink
3454 <werner@suse.de>
3455
3456 execute_cmd.c
3457 - execute_disk_command: when there is a command_not_found_hook, make
3458 sure the subshell turns off job control before running it, in case
3459 it runs processes. We don't want it to manipulate process groups.
3460 Fixes bug reported by ÐиÑиллов Ðима <dk.1997-fast@yandex.ru>
3461 - execute_command_internal: make sure the command run by the `command'
3462 builtin doesn't cause the ERR trap to be executed; wait for the
3463 status to be returned by the command builtin. Fixes bug reported by
3464 Martijn Dekker <martijn@inlv.org>
3465
3466 4/4
3467 ---
3468 subst.c
3469 - process_substitute: handle longjmp back to top_level and function
3470 returns (return_catch) in the child process, like command
3471 substitution, so we don't longjmp back to some arbitrary spot from
3472 the `exit' or `return' builtins, or on an expansion error, like
3473 the command timing code. Fixes bug reported by Basin Ilya
3474 <basinilya@gmail.com>
3475
3476 4/6
3477 ---
3478 parse.y
3479 - read_token_word: when reading a matched pair of backquotes as part
3480 of a word, treat it as quoted so the characters are read as a single
3481 word, but do not let the presence of the backquote mark the word as
3482 quoted. Fixes here-document delimiter bug reported by Denys Vlasenko
3483 <dvlasenk@redhat.com>
3484
3485 4/7
3486 ---
3487 execute_cmd.c
3488 - execute_case_command: call quote_string_for_globbing with the
3489 QGLOB_CTLESC flag for both quoted and unquoted words, so it will
3490 remove CTLESC/CTLESC in all cases while converting other quoted
3491 characters to use a preceding backslash. Bug reported by
3492 Martijn Dekker <martijn@inlv.org>
3493
3494 4/9
3495 ---
3496 smatch.c
3497 - posix_cclass_only: helper function that checks whether a pattern has
3498 only posix single-byte character classes ([:alpha:], etc.) or has
3499 none at all
3500 - xstrmatch: if running in a multibyte locale, make sure to short-
3501 circuit to the single-byte matching code only if there are no
3502 unrecognized character class names, since the wide character ctype
3503 functions allow locales to define their own character class names
3504 (e.g., "hyphen"). Fixes issue reported by yangyajing <yyj_cqu@163.com>
3505
3506 4/10
3507 ----
3508 configure.ac,cross-build/qnx.cache
3509 - qnx: add a configure cache file for cross-building, treat qnx 7 like
3510 qnx 6 in terms of cpp options. Fix from Brian Carnes
3511 <bcarnes@google.com>
3512
3513 aclocal.m4
3514 - BASH_CHECK_DEV_STDIN: experimental change to test for /dev/stdin
3515 independently of /dev/fd or /proc/self/fd. Suggested for QNX by
3516 Brian Carnes <bcarnes@google.com>
3517
3518
3519 4/11
3520 ----
3521 lib/glob/glob.c
3522 - glob_testdir: return -2 if DIR is a symlink, to differentiate it from
3523 any other kind of non-directory file
3524 - glob_vector: if we have GX_ALLDIRS (globstar), we want to skip over
3525 symlinks to directories, since we will pick up the real directory
3526 later. Fixes incompatibility reported by Murukesh Mohanan
3527 <murukesh.mohanan@gmail.com>
3528
3529 bashline.c
3530 - bash_execute_unix_command: changes to make READLINE_POINT apply to
3531 characters instead of bytes when in a multibyte locale. Report and
3532 fix from Koichi Murase <myoga.murase@gmail.com>
3533
3534 4/12
3535 ----
3536 builtins/evalstring.c
3537 - parse_and_execute_cleanup: now takes an argument which is the value
3538 of running_trap at some point before parse_and_execute was called;
3539 changed callers in sig.c, builtins/evalfile.c
3540
3541 builtins/common.h
3542 - parse_and_execute_cleanup: changed prototype
3543
3544 4/13
3545 ----
3546 builtins/evalstring.c
3547 - parse_and_execute_cleanup: if the argument holding the previous state
3548 of running_trap is the same value as the current running_trap state,
3549 don't call run_trap_cleanup: assume that there is a caller who will
3550 take care of the cleanup after this returns. Fixes recursive trap
3551 call on "eval return" reported by Martijn Dekker <martijn@inlv.org>
3552
3553 parse.y
3554 - read_a_line: if remove_quoted_newline is non-zero, indicating the
3555 here-document delimiter is unquoted, we will be running the contents
3556 of the here-document through word expansion and need to quote CTLESC
3557 and CTLNUL in the input. Fixes bug with ^A in here document reported
3558 by Jorge Alberto Baca Garcia <bacagarcia@me.com>
3559
3560 4/18
3561 ----
3562 pathexp.c
3563 - quote_string_for_globbing: make sure the QGLOB_CTLESC code handles
3564 both CTLESC CTLESC and CTLESC CTLNUL in the same way. Fixes bug
3565 reported by Martijn Dekker <martijn@inlv.org>
3566
3567 4/19
3568 ----
3569 execute_cmd.c
3570 - execute_command_internal: before executing any command in the current
3571 shell, and before copying any existing FIFO list, call
3572 reap_procsubs to unlink or close any process substitution pipes
3573 associated with processes that have exited. Fixes hang in test suite
3574 when trying to open a FIFO with no process having it open for
3575 reading
3576
3577 4/26
3578 ----
3579 parse.y
3580 - read_token_word: if returning REDIR_WORD for a {id}>foo construct,
3581 for example, make sure to assign the_word to yylval.word before
3582 returning, in case a recursive call to the parser overwrites it
3583 (e.g., when evaluating array indexes). From a message to
3584 austin-group-l from Stephane Chazelas <stephane.chazelas@gmail.com>
3585
3586 lib/glob/sm_loop.c
3587 - BRACKMATCH: if we have an invalid character class in an otherwise
3588 well-formed bracket expression, don't try to match each character
3589 of the (invalid) class individually; just skip over the class and
3590 move on. From a message on the austin-group list from
3591 Stephane Chazelas <stephane.chazelas@gmail.com>
3592
3593 4/27
3594 ----
3595 variables.c
3596 - push_exported_var,push_func_var,push_temp_var: make sure to set the
3597 context correctly in the variable we bind in the previous (non-temp)
3598 scope. Report from Martijn Dekker <martijn@inlv.org>
3599
3600 pathexp.c
3601 - unquoted_glob_pattern_p: a pattern that contains a backslash can
3602 have it removed by the matching engine (since backslash is special
3603 in pattern matching), so if the pattern contains a backslash, and
3604 does not end in a backslash, we need to return true. Fixes bug
3605 reported by Robert Elz <kre@bmunnari.OZ.AU>
3606
3607 lib/glob/glob_loop.c
3608 - INTERNAL_GLOB_PATTERN_P: same change to return TRUE for a backslash
3609 that doesn't end the pattern
3610
3611 lib/sh/timeval.c
3612 - print_timeval: use locale_decpoint() instead of fixed `.' to print
3613 decimal point. Bug report in austin-group email from Joerg Schilling
3614 <Joerg.Schilling@fokus.fraunhofer.de>
3615
3616 lib/sh/clock.c
3617 - print_clock_t: use locale_depoint() in the same way as print_timeval
3618
3619 4/29
3620 ----
3621 subst.c
3622 - expand_cond_node: if special != 0, make sure to add QGLOB_CTLESC
3623 to the flags passed to quote_string_for_globbing. Same issue as the
3624 one with `case' fixed on 4/7, report from Martijn Dekker
3625 <martijn@inlv.org>
3626
3627 4/30
3628 ----
3629 redir.c
3630 - do_redirection_internal: r_close_this: if the file descriptor is
3631 already closed before the shell is asked to close it, make sure to
3632 add an undo list redirect to make sure it stays closed. Report from
3633 Martijn Dekker <martijn@inlv.org>
3634
3635 5/2
3636 ---
3637 variables.c
3638 - push_posix_temp_var: new function, takes the SHELL_VAR * passed as
3639 an argument and uses the name and value to create a global variable
3640 - merge_temporary_env: if posixly_correct is set, call
3641 push_posix_temp_var to create global variables, otherwise call
3642 push_temp_var to preserve the old behavior. Right now, it's only
3643 called when in posix mode, but that might change. This undoes the
3644 change from 4/27 when in posix mode
3645
3646 5/3
3647 ---
3648 sig.c
3649 - struct that holds the terminating signal information has a new
3650 field: whether that signal is expected to cause a core dump
3651 - termsig_handler: if the call to kill(2) doesn't kill the process,
3652 we have a problem. If our pid is not 1, we just exit with status
3653 128+sig (fake the sig exit status). If the pid is 1, we assume
3654 we're in a Linux pid namespace and aren't allowed to send a signal
3655 to ourselves. If we need to generate a core dump, we try to get
3656 the kernel to SIGSEGV us by dereferencing location 0. If not, we
3657 just exit with 128+sig. From a report and patch from Andrei Vagin
3658 <avagin@virtuozzo.com>
3659
3660 5/4
3661 ---
3662 bashline.c
3663 - bash_execute_unix_command: make sure that parse_and_execute is called
3664 with newly-allocated memory to avoid prematurely freeing the
3665 command. Report and fix from Koichi Murase <myoga.murase@gmail.com>
3666
3667 5/7
3668 ---
3669 builtins/shopt.def
3670 - syslog_history: a shell option to control whether history is logged
3671 to syslog; can be modified at runtime. Original patch from
3672 Siteshwar Vashisht <svashisht@redhat.com>
3673
3674 config-top.h
3675 - SYSLOG_SHOPT: new configurable option, determines whether there is a
3676 shell option to control syslogging history lines at runtime and sets
3677 the default value of the option
3678
3679 bashline.c
3680 - syslog_history: new variable to control whether history lines are
3681 sent to syslog; default value is the value of SYSLOG_SHOPT (or 1
3682 if that's not defined)
3683 - bash_add_history: send history lines to syslog if syslog_history is
3684 non-zero
3685
3686 5/10
3687 ----
3688
3689 variables.c
3690 - push_var_context: if we are in Posix mode and manipulating the
3691 temporary environment (temporary_env), implement behavior specified
3692 in Posix interp 1009 and make sure that temporary assignments
3693 preceding function calls modify the current environment *before*
3694 the function is executed.
3695
3696 [bash-5.0-alpha frozen]
3697
3698 5/12
3699 ----
3700 execute_cmd.c
3701 - execute_in_subshell: subshells should set loop_level == 0, since
3702 they are no longer "enclosed" by the loop, according to posix.
3703 Report from Aeron.E. Wang <aeron.e.wang@gmail.com>
3704
3705 5/24
3706 ----
3707 Makefile.in
3708 - pkgconfigdir: don't fail installing bash.pc if this directory doesn't
3709 exist or isn't writable -- there's no error in failing to install
3710 something nothing will use
3711 - install-headers-dirs: creat $(pkgconfigdir) if it doesn't exist
3712
3713 lib/sh/shmbchar.c
3714 - utf8_mblen: replace with version from gnulib
3715 - utf8_mbstrlen: reimplement using utf8_mblen so it handles invalid
3716 multibyte sequences in the same way as mbstrlen
3717
3718 lib/readline/mbutil.c
3719 - _rl_utf8_mblen: utf-8 specific version of mblen from gnulib
3720
3721 include/shmbutil.h
3722 - ADVANCE_CHAR,COPY_CHAR_P: do better job detecting end of string in
3723 UTF-8 locales (should not be called with an empty string, but to
3724 be safe)
3725
3726 5/25
3727 ----
3728 lib/sh/utf8.c
3729 - new file, utf-8-specific functions collected from other files
3730
3731 externs.h
3732 - extern declarations moved around for utf8.c
3733
3734 include/shmbutil.h
3735 - SADD_MBCHAR, SADD_MBQCHAR_BODY, ADVANCE_CHAR_P: if the locale is a
3736 UTF-8 locale, don't bother with a call to mbrlen if the current
3737 character cannot start a multibyte character
3738
3739 variables.c
3740 - push_var_context: only merge the temporary environment in posix mode
3741 if we are executing a shell function (flags & VC_FUNCENV). Report
3742 from Martijn Dekker <martijn@inlv.org>
3743
3744 lib/readline/mbutil.c
3745 - _rl_get_char_len: don't call mbrlen if we are in a UTF-8 locale and
3746 the character cannot start a multibyte sequence
3747
3748 builtins/read.def
3749 - read_builtin: if mb_cur_max > 1, call read_mbchar only if we're not
3750 in a utf-8 locale or, if we are, the character we just read indicates
3751 the start of a multibyte sequence
3752
3753 subst.c
3754 - string_extract_verbatim: don't call MBRLEN if we're in a utf-8
3755 locale and the current character can't start a multibyte sequence
3756 - setifs: don't call MBRLEN if we're in a utf-8 locale and the first
3757 character of $IFS can't start a multibyte sequence
3758
3759 lib/readline/kill.c
3760 - rl_bracketed_paste_begin: make sure we return 0 here if rl_insert_text
3761 returns the right number of characters inserted to be consistent
3762 with other functions. Returns 1 otherwise. Report and fix from
3763 Gabe Krabbe <gabe@rtfs.de> back in March, 2018
3764
3765 lib/readline/readline.c
3766 - rl_subseq_result: make sure r is < 0 before checking map[ANYOTHERKEY]
3767 to see if we shadowed a key that should now be tried
3768
3769 5/27
3770 ----
3771 variables.c
3772 - assign_aliasvar: perform same validity check on subscript assignment
3773 as alias builtin performs on name argument. Bug report from
3774 Mike Jonkmans <bashbug@jonkmans.nl>
3775
3776 5/29
3777 ----
3778 builtins/setattr.def
3779 - set_var_attribute: we should not propagate a variable assignment
3780 preceding a builtin back to the calling environment unless the
3781 shell is in posix mode. Since previous versions of the shell do
3782 this, setting the shell compatibility level to 44 or less will
3783 continue the propagation behavior
3784
3785 6/1
3786 ---
3787 lib/readline/histexpand.c
3788 - history_tokenize_word: as part of teaching history tokenization more
3789 and more about shell syntax, allow command and process subsitution
3790 and extended globbing patterns to appear within a word being
3791 tokenized and not just at the beginning. Fixes bug reported back in
3792 2/2017 by ecki@tofex.de
3793
3794 bashhist.c
3795 - load_history: use HISTSIZE_DEFAULT (still defaults to "500") to set
3796 the initial value of $HISTSIZE. HISTSIZE_DEFAULT can be overridden
3797 in config-top.h
3798
3799 6/4
3800 ---
3801 configure.ac
3802 - make sure we link against an external readline library that's at
3803 least version 8
3804
3805 6/8
3806 ---
3807 pcomplete.h
3808 - INITIALWORD: internal compspec name for programmable completion on
3809 the initial (usually the command) word
3810
3811 bashline.c
3812 - attempt_shell_completion: if we are in a command position and the
3813 user has defined a compspec for INITIALWORD, use programmable
3814 completion to complete command words. Original patch from
3815 Luca Boccassi <bluca@debian.org>
3816
3817 lib/readline/doc/rluser.texi,builtins/complete.def,doc/bash.1
3818 - make it clearer that -D takes precedence over -E when supplied as
3819 options to `complete', not when they are applied during completion
3820
3821 builtins/complete.def
3822 - complete_builtin,compgen_builtin: add support for -I option
3823 - print_one_completion,print_compopts: display -I when appropriate
3824
3825 lib/readline/doc/rluser.texi,doc/bash.1
3826 - complete,compgen: document new -I option and its effect
3827
3828 6/10
3829 ----
3830 lib/readline/histfile.c
3831 - read_history_range: don't apply the heuristic and try to append a
3832 history line to an existing history entry if we don't have any
3833 history entries. Bug and fix from Edward Huff <ejhuff@gmail.com>
3834
3835 6/12
3836 ----
3837 bashline.c
3838 - attempt_shell_completion: don't all the programmable completion for
3839 INITIALWORD if programmable completion is disabled
3840 - attempt_shell_completion: make sure in_command_position remains set
3841 for an empty command word on an otherwise blank line, making the
3842 presence of assignment statements optional. Report from
3843 Luca Boccassi <bluca@debian.org>
3844
3845 6/20
3846 ----
3847 lib/malloc/malloc.c
3848 - morecore,internal_malloc,internal_free: requests for more than
3849 128K bytes (defined as MMAP_THRESHOLD and saved in the new
3850 malloc_mmap_threshold variable) are now satisfied via mmap and
3851 freed via munmap. We only use mmap if we have mmap and MAP_ANON
3852 (or MAP_ANONYMOUS). These blocks are not available for splitting
3853 or coalescing, so every request for 128K bytes or smaller is
3854 satisfied via sbrk(). We don't use mremap for realloc yet, but
3855 we could in the future
3856
3857 lib/malloc/mstats.h
3858 - malloc_stats: the malloc stats now include the number of calls to
3859 mmap and the total number of bytes requested via mmap. The number
3860 of calls to munmap is captured in each bucket's lesscore count
3861
3862 lib/malloc/stats.c
3863 - print_malloc_stats: now prints an indication of where the change from
3864 sbrk to mmap takes place, and prints number of mmap calls and total
3865 number of bytes allocated using mmap
3866
3867 6/22
3868 ----
3869 variables.c
3870 - get_bashargcv: new dynamic "fetch" variable for BASH_ARGV and
3871 BASH_ARGC, for backwards compatibility: if a script makes a
3872 reference to either variable at the top level (not in a shell
3873 function) without enabling debugging mode and not having initialized
3874 the variable previously (using a simple semaphore), create the
3875 variables
3876
3877 6/25
3878 ----
3879 configure.ac
3880 - opt_bash_malloc: bash malloc no longer disabled for systems that
3881 require eight-bit alignment; the bash malloc has had this for a
3882 long time
3883
3884 7/4
3885 ---
3886 bashline.c
3887 - pre_process_line: if command-oriented history is enabled, and the
3888 line being expanded is the second or later in a multi-line command,
3889 and we know the command is being saved as the current history entry,
3890 decrease history_length before calling history_expand so references
3891 like !! refer to the previous history entry as usual
3892
3893 lib/readline/histexpand.c
3894 - history_quoting_state: new variable, can be set by calling
3895 application before calling history_expand to note that the string
3896 being expanded is part of a quoted string. Can be set to a single
3897 quote, a double quote, or 0 (no quoting)
3898 - history_expand: look at history_quoting_state and honor the
3899 single-quote setting by not expanding any initial portion of the
3900 line before the closing single quote. This allows history expansions
3901 to be performed on a line containing a closing single quote if they
3902 appear after the single quote
3903
3904 lib/readline/history.h
3905 - history_quoting_state: extern declaration
3906
3907 bashhist.c
3908 - bash_history_inhibit_expansion: if history_quoting_state indicates
3909 that this string is single-quoted, skip over the single-quoted
3910 portion and determine whether or not the portion after the
3911 quoted string needs to be inhibited from history expansion
3912
3913 parse.y
3914 - shell_getc: set history_quoting_state based on the contents of the
3915 current delimiter before calling pre_process_line
3916
3917 7/6
3918 ---
3919 lib/readline/doc/hsuser.texi
3920 - describe the default behavior of backslash and single and double
3921 quotes
3922
3923 lib/readline/doc/hstech.texi
3924 - history_quoting_state: describe effect of setting this variable
3925 - history_quotes_inihibit_expansion: expand the description to include
3926 the default quoting behavior that setting this variable enables
3927
3928 7/9
3929 ---
3930 support/man2html.c
3931 - unescape: use memmove instead of strcpy to handle overlapping strings
3932 Report and fix from Bernhard M. Wiedemann <bwiedemann@suse.de>
3933
3934 lib/sh/getenv.c
3935 - getenv: check that environ is non-NULL before looking through it.
3936 Report and fix from Keeley Hoek <keeley@hoek.io>
3937
3938 7/12
3939 ----
3940 braces.c
3941 - mkseq: use better integer overflow handling for systems with 32-bit
3942 ints and 64-bit intmax_ts. Bug reported by Simon Wörner
3943 <mail@simon-woerner.de> as the result of fuzzing
3944
3945 builtins/declare.def
3946 - declare_internal: make sure bind_variable returns non-NULL when
3947 setting attributes for a variable named as an argument to declare
3948 that also appears in the temporary environment (and is a nameref).
3949 Bug reported by Simon Wörner <mail@simon-woerner.de as the
3950 result of fuzzing
3951
3952 variables.c
3953 - bind_variable_internal: if we're assigning through a nameref, don't
3954 create a variable with an invalid name under any circumstances
3955
3956 builtins/common.c
3957 - get_job_spec: make sure to return NO_JOB if atoi() returns < 0 due
3958 to integer overflow.
3959 Bug reported by Simon Wörner <mail@simon-woerner.de as the
3960 result of fuzzing
3961
3962 7/13
3963 ----
3964 execute_cmd.c
3965 - execute_in_subshell: don't call set_sigint_handler if the subshell
3966 is asynchronous, since it undoes the signal handler installed by
3967 setup_async_signals. Fixes bug reported by Daniel Mills
3968 <danielmills1@gmail.com>
3969
3970 parse.y,externs.h
3971 - reset_readahead_token: new convenience function for the rest of
3972 the shell, resets token_to_read if it's a newline (as it will be
3973 after reset_parser is called)
3974
3975 eval.c
3976 - reader_loop: if we're just going to execute one command, make sure
3977 the read-ahead token isn't set to something that will result in a
3978 NULL command (by calling reset_readahead_token), since the code
3979 will take that as the one command and set EOF_Reached
3980
3981 7/15
3982 ----
3983 doc/{bash.1,bashref.texi}
3984 - indirect expansion: clarify that the expansion works on parameters,
3985 not just variables (NAMEs). Suggested by konsolebox
3986 <konsolebox@gmail.com>
3987
3988 7/16
3989 ----
3990 doc/{bash.1,bashref.texi}
3991 - INSIDE_EMACS: document its effect on line editing
3992
3993 7/17
3994 ----
3995 lib/readline/{readline.c,rlprivate.h}
3996 - _rl_eof_found: new variable, private to the readline library, that
3997 indicates whether the current call to readline() will return NULL
3998 because we read EOF
3999
4000 lib/readline/rltty.c
4001 - rl_deprep_terminal: if bracketed paste mode is active, the last
4002 character of the string to disable it is \r (to avoid confusing
4003 the terminal driver about where the cursor is). In this case,
4004 output a newline before returning so subsequent text (like the
4005 `exit' bash prints) doesn't overwrite the prompt. Bug from
4006 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903936
4007
4008 variables.c
4009 - make_local_assoc_variable: add second argument like corresponding
4010 local array function, to allow this function to return an existing
4011 local array variable to the caller for the caller to handle
4012
4013 variables.h
4014 - make_local_assoc_variable: change function prototype to add second
4015 arg
4016
4017 {subst.c,variables.c}
4018 - make_local_assoc_variable: change callers
4019
4020 builtins/declare.def
4021 - declare_internal: call make_local_assoc_variable with a non-zero
4022 second arg to have it return an existing local array variable to be
4023 flagged as an error. Fixes bug reported by Grisha Levit
4024 <grishalevit@gmail.com>
4025 - declare_internal: call make_local_array_variable with unconditional
4026 second argument of 1 for the same reason as above
4027
4028 7/18
4029 ----
4030 variables.c
4031 - bind_invalid_envvar: new function, takes invalid names from the
4032 initial environment (names that are not valid shell identifiers) and
4033 stores them in a separate hash table (invalid_env)
4034 - maybe_make_export_env: make sure to add names from invalid_env to
4035 the export env
4036 - assign_in_env: for now, prevent variable names that aren't shell
4037 identifiers from being added to the temporary environment. Addresses
4038 issue raised by Grisha Levit <grishalevit@gmail.com>
4039
4040 test.c
4041 - unary_test: rearrange code slightly to avoid a wasted variable lookup
4042 if the argument to -v is a subscripted array reference
4043
4044 7/19
4045 ----
4046 variables.c
4047 - nameref_transform_name: if a name doesn't resolve to a shell variable,
4048 this function will check whether it resolves to a nameref that
4049 points to a variable that hasn't been created yet
4050
4051 variables.h
4052 - nameref_transform_name: extern declaration
4053
4054 subst.c
4055 - do_compound_assignment: make sure that we follow any nameref chain
4056 if the name passed resolves to a nameref that points to a variable
4057 that doesn't exist. Fixes issue raised by Grisha Levit
4058 <grishalevit@gmail.com>
4059
4060 builtins/declare.def
4061 - declare_internal: before calling any variant of make_local_variable,
4062 make sure to perform any transformation of the name indicated by an
4063 existing nameref. Fixes issue raised by Grisha Levit
4064 <grishalevit@gmail.com>
4065
4066 7/20
4067 ----
4068 builtins/declare.def
4069 - declare_internal: if we are creating a global variable with -g, even
4070 if we're not giving it a value, check for namerefs at the global
4071 scope to avoid confusion with namerefs at the local (function) scope.
4072
4073 subst.c
4074 - expand_word_internal: if a double-quoted string expands to nothing,
4075 make sure we note that for later by setting had_quoted_null, just
4076 as we do for single-quoted empty strings
4077
4078 subst.[ch]
4079 - W_SAWQUOTEDNULL: new flag (replaces W_HASCTLESC, which is unused),
4080 means that we saw a possibly-discarded quoted null while expanding
4081 this word
4082
4083 subst.c
4084 - expand_word_internal: if expansion results in a non-empty word but
4085 we saw a quoted null during expansion (had_quoted_null == 1), set
4086 W_SAWQUOTED_NULL in the returned word
4087 - expand_word_internal: if a recursive call to param_expand comes back
4088 with W_SAWQUOTEDNULL set in the resulting word, set had_quoted_null
4089 to note it
4090 - parameter_brace_expand_rhs: if a recursive call to expand_word_internal
4091 returns a non-quoted-null string (after an optional call to
4092 string_list) make sure we pass the W_SAWQUOTEDNULL flag back to the
4093 caller
4094 - word_list_split: if a word expands to nothing after expansion and
4095 splitting, but we saw a quoted null during the expansion
4096 (W_SAWQUOTEDNULL), return an empty word
4097
4098 7/25
4099 ----
4100
4101 subst.c
4102 - do_compound_assignment: if creating a local variable, make sure to
4103 set `newname' to the name of the variable returned from find_variable,
4104 since that follows namerefs. Fixes issue raised by Grisha Levit
4105 <grishalevit@gmail.com>
4106
4107 7/29
4108 ----
4109 subst.c
4110 - get_var_and_type: if VALUE is NULL, check before calling dequote_string.
4111 Report and fix from Grisha Levit <grishalevit@gmail.com>
4112
4113 7/30
4114 ----
4115 variables.c
4116 - make_local_{array,assoc}_variable: make sure we're not trying to
4117 inherit a value from an incompatible array type. Fixes issue raised
4118 by Grisha Levit <grishalevit@gmail.com>
4119 - nameref_transform_name: if we're trying to resolve a nameref that
4120 will be used to create a local variable, make sure the nameref is
4121 at the same variable scope. Report from Grisha Levit
4122 <grishalevit@gmail.com>
4123
4124 8/2
4125 ---
4126 array.c
4127 - array_subrange: change to use string_list_pos_params after creating a
4128 WORD_LIST from the array slice, like assoc_subrange does
4129
4130 subst.c
4131 - parameter_brace_substring: since assoc_subrange and array_subrange
4132 both call string_list_pos_params now, treat the results the same as
4133 the VT_POSPARAMS case (pos_params also calls string_list_pos_params).
4134 Fixes behavior difference between ${a[@]:sub} and ${@:sub} reported
4135 by Ilkka Virta <itvirta@iki.fi>
4136
4137 8/3
4138 ---
4139 array.c
4140 - array_patsub: rewrite to work in terms of a WORD_LIST * and call
4141 string_list_pos_params on the result to be consistent with the
4142 expansions of ${@/pat/rep} and ${*/pat/rep}
4143
4144 assoc.c
4145 - assoc_patsub: rewrite to work in terms of a WORD_LIST * and call
4146 string_list_pos_params on the result to be consistent with the
4147 expansions of ${@/pat/rep} and ${*/pat/rep}
4148
4149 subst.c
4150 - parameter_brace_patsub: change how return value of {array,assoc}_patsub
4151 is treated to make it identical to pos_params_pat_subst, since they
4152 all call string_list_pos_params now
4153 - expand_string_for_pat: make sure we preserve the value of
4154 expand_no_split_dollar_star instead of just unconditionally setting
4155 it back to 0 in case it was 1 before this function was called
4156
4157 8/6
4158 ---
4159 array.c
4160 - array_modcase: rewrite to work in terms of a WORD_LIST * and call
4161 string_list_pos_params on the result to be consistent with the
4162 expansions of ${@,,} and ${*,,}
4163
4164 assoc.c
4165 - assoc_modcase: rewrite to work in terms of a WORD_LIST * and call
4166 string_list_pos_params on the result to be consistent with the
4167 expansions of ${@,,} and ${*,,}
4168
4169 subst.c
4170 - parameter_brace_casemod: change how return value of {array,assoc}_modcase
4171 is treated to make it identical to pos_params_modcase, since they
4172 all call string_list_pos_params now
4173
4174 8/8
4175 ---
4176 builtins/declare.def
4177 - declare_internal: if we are making local variables, and not dealing
4178 with the nameref attribute, make sure that any nameref variable we
4179 followed when resolving the name given was at the same variable
4180 context. If not, we just want to make or use a local variable with
4181 the name passed; if so, we want to use the nameref value as the
4182 variable name. Report from Grisha Levit <grishalevit@gmail.com>
4183
4184 8/9
4185 ---
4186 configure.ac
4187 - globasciiranges: RRI now on by default, must be turned off explicitly
4188 at configure time or runtime with `shopt -u globasciiranges'
4189
4190 8/14
4191 ----
4192 variables.c
4193 - dispose_saved_dollar_vars: decrement stack pointer before looking
4194 for saved positional parameters to dispose; stack pointer always
4195 points to the first unused slot
4196
4197 8/15
4198 ----
4199 variables.c
4200 - dollar_arg_stack: now a stack of struct saved_dollar_vars, which has
4201 an array for the first ten (dollar_vars) and a WORD_LIST * for the
4202 remaining (rest_of_args). Fixes performance issue with function calls
4203 and large numbers of positional parameters raised by
4204 Bize Ma <binaryzebra@gmail.com>
4205 - {save,restore,free,free_saved}_dollar_vars: new functions to manage
4206 dollar_vars and dollar_arg_stack members. Need to keep these in sync
4207 with whatever remember_args does
4208 - push_dollar_vars: use save_dollar_vars, which just copies pointers,
4209 and directly assign rest_of_args, without copying the words, to the
4210 dollar_arg_stack entry. Have to clear dollar_vars and rest_of_args
4211 with the assumption that callers will call remember_args(args, 1)
4212 immediately following
4213 - pop_dollar_vars: free current positional parameters and restore old
4214 ones from pointers saved in dollar_arg_stack, making sure to
4215 invalidate any cached value for "$@"
4216 - dispose_saved_dollar_vars: free saved pointers from current index
4217 into dollar_arg_stack
4218
4219 doc/{bash.1,bashref.texi}
4220 - POSIXLY_CORRECT: make sure to note that bash makes sure this variable
4221 is set when posix mode is enabled
4222
4223 8/17
4224 ----
4225 {jobs,nojobs}.c
4226 - set_jobs_list_frozen: set jobs_list_frozen to a particular value.
4227 Intended to save and restore the value around code sections instead
4228 of unconditionally unfreezing it.
4229
4230 jobs.h
4231 - set_jobs_list_frozen: extern declaration
4232
4233 execute_cmd.c
4234 - execute_pipeline: if lastpipe is enabled, save and restore the
4235 value of jobs_list_frozen using freeze_jobs_list/set_jobs_list_frozen
4236 to avoid problems with race conditions and nested pipelines
4237 causing jobs to be removed from the jobs table. Fixes savannah issue
4238 https://savannah.gnu.org/support/index.php?109541 reported by
4239 Björn Kautler <vampire0>
4240
4241 8/24
4242 ----
4243 execute_cmd.c
4244 - lastpipe_cleanup: call set_jobs_list_frozen instead of
4245 unfreeze_jobs_list
4246 - execute_pipeline: set up lastpipe_cleanup with old value of
4247 jobs_list_frozen
4248
4249 9/3
4250 ---
4251 builtins/printf.def
4252 - getuintmax,getfloatmax: on a conversion error, return as much of the
4253 value as we were able to convert instead of 0. Fixes bug reported
4254 by Robert Elz <kre@bmunnari.OZ.AU>
4255
4256 9/4
4257 ---
4258 lib/readline/text.c,lib/readline/rlprivate.h
4259 - _rl_backward_char_internal: new function, guts of rl_backward_char
4260 and rl_backward_byte, not currently used there
4261
4262 lib/readline/vi_mode.c
4263 - _rl_vi_advance_point: new function, move point forward by one
4264 character, handling multibyte locales and characters and the end
4265 of line semantics
4266 - _rl_vi_backup_point: new function, move point backward by one
4267 character, handling multibyte locales and characters
4268 - rl_vi_eword,rl_vi_eWord: use rl_vi_advance_point instead of a simple
4269 increment to handle multibyte characters. Fixes bug reported by
4270 Enrico Maria De Angelis <enricomaria.dean6elis@gmail.com>
4271
4272 9/5
4273 ---
4274 lib/readline/vi_mode.c
4275 - rl_vi_fword,rl_vi_fWord: use rl_vi_advance_point instead of a simple
4276 increment to handle multibyte characters
4277 - rl_vi_bword,rl_vi_bWord: use rl_vi_backup_point instead of a simple
4278 decrement (and _rl_vi_advance_point where necessary) to handle
4279 multibyte characters
4280 - rl_vi_complete,_rl_vi_change_mbchar_case,_rl_vi_domove_motion_cleanup:
4281 use _rl_vi_advance_point instead of simple rl_point increment
4282 - vi_delete_dispatch,vi_change_dispatch,vi_yank_dispatch: use
4283 INCREMENT_POS instead of a simple increment to rl_mark to handle
4284 multibyte characters
4285 - rl_vi_column: use _rl_forward_char_internal, starting with
4286 rl_point == 0, to handle multibyte characters (Posix says `character
4287 position', not index)
4288
4289 9/7
4290 ---
4291 configure.ac
4292 - changed release status to `beta'
4293
4294 9/9
4295 ---
4296 lib/readline/display.c
4297 - _rl_update_final: if the bottom line has zero characters and we are
4298 on that line at column 0, don't bother with an additional \r\n.
4299 Fixes redisplay nit reported by Per Bothner <per@bothner.com>
4300
4301
4302 configure.ac
4303 - openbsd needs DEV_FD_STAT_BROKEN defined
4304
4305 [bash-5.0-beta frozen]
4306
4307 9/11
4308 ----
4309 builtins/exec.def
4310 - exec_builtin: make sure to sync the buffered stream where bash is
4311 reading input (especially if it's fd 0) so a command exec'd by the
4312 script can read the rest of stdin after the exec
4313
4314 9/15
4315 ----
4316 lib/readline/histexpand.c
4317 - history_tokenize_internal: if the event contains embedded newlines
4318 (e.g., bash with command-oriented history and lithist), use them as
4319 word delimiters, equivalent to space and tab, so they don't end up
4320 as separate words. Fixes issue pointed out by Viktor Dukhovni
4321 <ietf-dane@dukhovni.org>
4322 - history_tokenize_word: don't break if we get a newline (though we
4323 shouldn't get one due to the loop in history_tokenize_internal
4324 - history_expand_internal: use newline as a whitespace character when
4325 expanding by words, as we do with history_tokenize_internal
4326
4327 jobs.h
4328 - J_PIPEFAIL: new flag for `flags' element of job struct
4329
4330 jobs.c
4331 - stop_pipeline: if pipefail_opt set, newjob gets J_PIPEFAIL in its
4332 flags word
4333 - raw_job_exit_status: use J_PIPEFAIL (setting of pipefail when job
4334 created) instead of current setting of pipefail status to determine
4335 how to compute exit status of pipeline. Tentative implementation of
4336 Posix proposal
4337
4338 expr.c
4339 - exp0: don't call expr_bind_variable with a NULL string. Fixes
4340 fuzzing bug reported by Eduardo Bustamante <dualbus@gmail.com>
4341 - expr_bind_variable: don't try to do anything with a NULL or empty
4342 LHS
4343
4344 9/16
4345 ----
4346 lib/readline/undo.c
4347 - rl_do_undo: before we release the undo list entry we've just
4348 processed, make sure we avoid any pointer aliasing issues caused
4349 by having the entry being removed as part of the undo list in
4350 _rl_saved_line_for_history. Fixes fuzzing bug reported by
4351 Eduardo Bustamante <dualbus@gmail.com>
4352
4353 9/17
4354 ----
4355 [bash-5.0-beta released]
4356
4357 9/18
4358 ----
4359 lib/readline/bind.c
4360 - name_and_keymap: new struct for keymap names and maps
4361 - builtin_keymap_names: static array of builtin keymap names and
4362 maps; preparing for allowing applications to set the names of
4363 keymaps they create; keymap_names is initially a pointer to
4364 this array
4365 - _rl_get_keymap_by_name,_rl_get_keymap_by_map: new functions for
4366 searching the keymap_names array and returning an index
4367 - rl_get_keymap_by_name, rl_get_keymap_name: rewritten in terms of
4368 new functions above
4369 - rl_set_keymap_name (char *name, Keymap map): new function, set
4370 name of MAP to NAME. NAME must not be builtin; MAP must not be one
4371 of the builtin keymaps. Request and initial implementation from
4372 Tom Tromey <tom@tromey.com>
4373
4374 lib/readline/readline.h
4375 - rl_set_keymap_name: new extern declaration for new public function
4376
4377 lib/readline/doc/rltech.texi
4378 - rl_set_keymap_name: add documentation
4379
4380 lib/readline/doc/rluser.texi
4381 - add text to `set keymap' description to note that applications
4382 can add keymap names that can be used there
4383
4384 9/20
4385 ----
4386 parse.y
4387 - shell_getc: don't execute the alias hack (returning a space at the
4388 end of the string) if we are parsing a command substitution that
4389 starts with a double paren (subshell inside a comsub), in which
4390 case the flags are PSH_DPAREN. Fixes fuzzing bug reported by
4391 Eduardo Bustamante <dualbus@gmail.com>
4392
4393 lib/readline/isearch.c
4394 - _rl_isearch_dispatch: default case: make sure we check multibyte
4395 char length when deciding whether to enlarge the search string
4396 buffer, instead of using the old assumption. Fixes fuzzing bug
4397 reported by Eduardo Bustamante <dualbus@gmail.com>
4398
4399 builtins/fc.def,execute_cmd.c
4400 - fixed some missing free()s uncovered by coverity. Report from
4401 Siteshwar Vashisht <svashisht@redhat.com>
4402
4403 lib/glob/glob.c
4404 - glob_vector: make sure name_vector is initialized to NULL
4405
4406 lib/sh/{pathcanon,pathphys}.c
4407 - {pathcanon,pathphys}: use memmove instead of strcpy on a possibly-
4408 overlapping region of memory
4409
4410 subst.c
4411 - parameter_list_transform: make sure to dispose the word list in all
4412 cases before returning
4413 - parameter_brace_expand_rhs: make sure t1 is freed before returning
4414 due to an invalid name resulting from an indirect expansion
4415
4416 support/man2html.c
4417 - fixed a couple of memory leaks
4418
4419 9/21
4420 ----
4421 subst.c
4422 - process_substitute: if we are part of a job control process chain
4423 (pipeline_pgrp != shell_pgrp), have the child shell forked to run
4424 the process substitution set pipeline_pgrp to its own PID,
4425 effectively becoming a process group leader without changing
4426 its own process group. Fixes stray SIGHUP issue reported by
4427 Jeremy Townshend <jeremy.townshend@gmail.com>
4428
4429 9/23
4430 ----
4431 arrayfunc.c
4432 - assign_array_element: if we are assigning to an existing associative
4433 array, and assoc_expand_once is set, allow `*' and `@' as subscripts.
4434 Partial fix for report from Grisha Levit <grishalevit@gmail.com>
4435
4436 variables.c
4437 - bind_int_variable: if valid_array_reference (lhs) is not true,
4438 make sure that the lhs is a valid identifier before assigning the
4439 value
4440
4441 arrayfunc.c
4442 - valid_array_reference: allow blank subscripts. They are treated as
4443 `normal' keys for associative arrays and evaluate to 0 for indexed
4444 arrays. More of fix for report from Grisha Levit
4445 <grishalevit@gmail.com>
4446
4447 9/24
4448 ----
4449 bashline.c
4450 - restore_tilde: if the expanded length (xl) is longer than vl
4451 we end up requesting a negative amount of memory (an extremely
4452 large unsigned number). Just punt and return val in this case.
4453 Fuzzing bug reported by Eduardo Bustamante <dualbus@gmail.com>
4454 - restore_tilde: make sure we return what the user typed if tilde
4455 expansion fails
4456
4457 9/29
4458 ----
4459 builtins/shopt.def
4460 - uncomment `localvar_unset' option definition
4461
4462 doc/{bash.1,bashref.texi}
4463 - document `localvar_unset' shell option
4464
4465 arrayfunc.c
4466 - valid_array_reference: if we are parsing a subscript for an existing
4467 associative array, the `assoc_expand_once' option is set, and the
4468 VA_ONEWORD flag is set in FLAGS (meaning there should be nothing
4469 following the closing `]'), don't call skipsubscript to find the
4470 closing `]', use one that is at the end of the word. Part of fix for
4471 issue reported by Grisha Levit <grishalevit@gmail.com>
4472
4473 builtins/{printf,set}.def
4474 - pass VA_ONEWORD as part of flags value everywhere valid_array_reference
4475 is used
4476
4477 config-top.h
4478 - CHECKWINSIZE_DEFAULT: now 1, so check_window_size is on by default
4479 - HISTEXPAND_DEFAULT: new define, allows builder to enable or disable
4480 history expansion by default at build time
4481
4482 doc/{bash.1,bashref.texi}
4483 - checkwinsize: document new default value
4484
4485 bashhist.h
4486 - HISTEXPAND_DEFAULT: don't define if it's already defined. Strict
4487 POSIX mode continues to default to off
4488
4489 9/30
4490 ----
4491 lib/readline/input.c
4492 - win32_isatty: win32-specific changes from GDB. Patch submitted by
4493 Tom Tromey <tom@tromey.com>, originally from Eli Zaretskii
4494 <eliz@gnu.org>
4495
4496 10/1
4497 ----
4498 lib/readline/vi_mode.c
4499 - rl_vi_start_inserting: start an undo group so we can grab the text
4500 inserted here as a single unit, avoiding any insert coalescing
4501 performed by rl_insert_text. Report and fix from Richard Todd
4502 <richard.w.todd@outlook.com>
4503
4504 10/3
4505 ----
4506 subst.c
4507 - parameter_brace_transform: if we're asked to display the attributes
4508 of an unset variable, check that the variable exists even if
4509 get_var_and_type returns NULL (it checks invisible_p). Requested by
4510 Michal Pesa <pesathem@gmail.com>
4511
4512 lib/readline/kill.c
4513 - _rl_bracketed_text: new function, collects the text pasted in
4514 bracketed paste mode and consumes the bracketed paste end marker;
4515 returns the pasted text and its length
4516 - rl_bracketed_paste_begin: call _rl_bracketed_text to collect the
4517 text
4518
4519 lib/readline/isearch.c
4520 - _rl_isearch_dispatch: set cxt->lastc to -7 if the input resolves to
4521 rl_bracketed_paste_begin
4522 - _rl_isearch_dispatch: if cxt->lastc == -7, call _rl_bracketed_text
4523 to collect the pasted text and add it to the accumulating search
4524 string. Only works if ESC is not one of the isearch terminators.
4525 Fixes issue reported in Debian bug report 891780,
4526 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891780
4527
4528 10/5
4529 ----
4530 variables.c
4531 - push_posix_tempvar_internal: new function, body of push_func_var
4532 with additional argument saying whether it's being called from a
4533 function or (special) builtin code path
4534 - push_builtin_var: new function, calls push_posix_tempvar_internal
4535 with second argument indicating builtin code path
4536 - push_func_var: now a stub that calls push_posix_tempvar_internal
4537 with second argument indicating function code path
4538 - pop_scope: if called from a special builtin, call push_builtin_var
4539 instead of push_func_var to do the right variable propagation
4540
4541 builtins/shopt.def
4542 - progcomp_alias: uncomment, make available to users
4543
4544 doc/{bash.1,bashref.texi},lib/readline/doc/rluser.texi
4545 - progcomp_alias: document shopt option, describe its use in
4546 the section on programmable completion
4547
4548 trap.c
4549 - decode_signal: handle SIGRTMIN+n at runtime, with the `SIG' prefix
4550 or without, case-insensitively if requested, and return SIGRTMIN+n.
4551 These values could be different than what was available at compile
4552 time. Report and patch from Rasmus Villemoes <rv@rasumsvillemoes.dk>
4553
4554 10/8
4555 ----
4556 execute_cmd.c
4557 - execute_command_internal: only set line_number from command->value.Subshell
4558 if the type == cm_subshell; otherwise defer and set later
4559
4560 10/10
4561 -----
4562 examples/loadables/seq.c
4563 - seq: new loadable builtin, derived originally from coreutils:seq.c
4564 but with very little of that code remaining
4565
4566 10/12
4567 -----
4568 trap.c
4569 - run_pending_traps,_run_trap_internal: honor evalnest_max and
4570 increment/decrement evalnest accordingly, since trap actions
4571 are processed as if run by `eval'. Feature suggsted by Mike
4572 Gerwitz <mtg@gnu.org>
4573
4574 10/16
4575 -----
4576 expr.c
4577 - expr_skipsubscript: new function, calls skipsubscript with flags
4578 similar to arrayfunc.c:valid_array_subscript if assoc_expand_once
4579 is set and it looks like we've already expanded the subscript of
4580 an associative array. Reported back on 8/27 by Grisha Levit
4581 <grishalevit@gmail.com>
4582 - readtok: call expr_skipsubscript instead of skipsubscript
4583
4584 arrayfunc.c
4585 - valid_array_reference: call skipsubscript with a third arg computed
4586 from the VA_NOEXPAND flag only if we're expanding an associative
4587 array subscript -- we already figure out whether or not we are
4588
4589 [bumped release status to beta2]
4590
4591 10/20
4592 -----
4593 builtins/setattr.def
4594 - set_or_show_attributes: after isolating NAME, make sure to restore
4595 the "[+]=" in case we need the word later. Issue pointed out by
4596 Grisha Levit <grishalevit@gmail.com>
4597
4598 10/21
4599 -----
4600 lib/readline/search.c
4601 - noninc_search_from_pos: if we are supposed to be searching for a
4602 pattern (vi mode), make sure to pass S to _hs_history_patsearch,
4603 since that has any leading `^' stripped
4604
4605 lib/readline/histsearch.c
4606 - _hs_history_patsearch: if the search isn't anchored, put a `*' at
4607 the beginning to force fnmatch to match anywhere in the line (could
4608 look at this later to make a change to history_search_internal that
4609 would avoid the need to add the leading `*')
4610
4611 subst.c
4612 - parameter_brace_expand_rhs: treat a failure to assign a variable with
4613 a ${param:=value} expansion as an expansion error, and, in a non-
4614 interactive posix-mode shell, exit the shell
4615 - param_expand: don't set W_SPLITSPACE for $* unless IFS is NULL;
4616 consistent with other uses of W_SPLITSPACE
4617
4618 10/22
4619 -----
4620 doc/{bash.1,bashref.texi}
4621 - tweak description of bash conditional expressions to note that the
4622 test and [ commands determine their behavior based on the number of
4623 arguments. Suggested by Ilkka Virta <itvirta@iki.fi>
4624
4625 10/24
4626 -----
4627 execute_cmd.c
4628 - execute_simple_command: don't set $_ to NULL when executing a
4629 command that forks; just leave it unchanged. Tweaked the documentation
4630 slightly as a result. Inspired by report from Ricky Tigg
4631 <ricky.tigg@gmail.com>
4632
4633 10/28
4634 -----
4635 redir.c
4636 - here_document_to_fd: make sure the temp files used to store here
4637 documents are readable (and writable, where necessary) by the user.
4638 This can happen in the unlikely case that someone decides to shoot
4639 himself in the foot by setting the umask to 400. Issue originally
4640 raised back in March by Stephane Chazelas
4641 <stephane.chazelas@gmail.com>; fix inspired by Martijn Dekker
4642 <martijn@inlv.org>
4643
4644 10/29
4645 -----
4646 lib/readline/terminal.c
4647 - bind_termcap_arrow_keys: bind the "kI" capability (what the Insert
4648 keypad key outputs) to overwrite mode. Patch from Xose Vazquez Perez
4649 <xose.vazquez@gmail.com>
4650
4651 10/30
4652 -----
4653 braces.c
4654 - mkseq: make sure to terminate result array before passing it to
4655 strvec_dispose on an interrupt. Report and fix from Corbin Souffrant
4656 <corbin.souffrant@gmail.com>
4657
4658 11/6
4659 ----
4660 trap.c
4661 - _run_trap_internal: if the signal shows up as SIG_CHANGED after
4662 running the trap handler, check for terminating signals and run any
4663 terminating signal handler indicates. Fixes issue reported by
4664 Owen Stephens <owen@owenstephens.co.uk>
4665
4666 11/7
4667 ----
4668 execute_cmd.c
4669 - execute_builtin: don't merge the temporary environment when the
4670 `return' builtin is being executed if it's being executed by the
4671 `command' builtin, since that's supposed to inhibit the special
4672 builtin properties. Part of POSIX conformance problems reported
4673 by Martin Rehak <martin.rehak@oracle.com>
4674
4675 builtins/cd.def
4676 - bindpwd: if canonicalization fails when -P is specified (e.g. if the
4677 directory name length exceeds PATH_MAX), reset dirname ($PWD value) =
4678 to the_current_working_directory (Posix cd description, step 10.)
4679 Part of POSIX conformance problems reported by Martin Rehak
4680 <martin.rehak@oracle.com>
4681
4682 builtins/kill.def
4683 - kill_builtin: support -sSIG and -nSIG without requiring them to be
4684 separate arguments. POSIX says a "conforming implementation" should
4685 accept them.
4686 Part of POSIX conformance problems reported by Martin Rehak
4687 <martin.rehak@oracle.com>
4688
4689 11/8
4690 ----
4691 arrayfunc.c
4692 - array_value_internal: return NULL for invisible array variables.
4693 Fixes issue with FUNCNAME sometimes returning invalid value reported
4694 by Great Big Dot <greatbigdot@gmail.com>
4695
4696 builtins/cd.def
4697 - change_to_directory: if we are in posix mode, and the chdir to the
4698 absolute pathname ($PWD/dirname) fails, return an error without
4699 trying to use just `dirname' (posix cd step 10).
4700 Part of POSIX conformance problems reported by Martin Rehak
4701 <martin.rehak@oracle.com>
4702
4703 execute_cmd.c
4704 - execute_case_command: use expand_word_leave_quoted to expand the
4705 word, then dequote the resulting string. This performs the
4706 expansions in the order posix specifies.
4707 Part of POSIX conformance problems reported by Martin Rehak
4708 <martin.rehak@oracle.com>
4709
4710 subst.c
4711 - expand_word_unsplit: rewrite in terms of expand_word_leave_quoted
4712 - ifs_whitespace: new macro, Posix ifs whitespace (ISSPACE; member
4713 of current locale's space char class)
4714 - ifs_whitesep: new macro, whitespace that is a member of $IFS; used
4715 by list_string and get_word_from_string
4716 - list_string: use ifs_whitesep instead of spctabnl in case $IFS
4717 contains whitespace characters that are not space, tab, or newline
4718 - get_word_from_string: use ifs_whitesep instead of spctabnl in case
4719 $IFS contains whitespace characters that are not space, tab, or
4720 newline.
4721 Part of POSIX conformance problems reported by Martin Rehak
4722 <martin.rehak@oracle.com>
4723
4724 11/9
4725 ----
4726 general.c
4727 - posix_initialize: enable the shift_verbose option when turning on
4728 posix mode, and disable it when posix mode is disabled. From a
4729 report by Eric Blake <eblake@redhat.com>
4730
4731 doc/bashref.texi
4732 - posix mode: note the effect of posix mode on shift_verbose
4733
4734 11/12
4735 -----
4736 subst.c
4737 - parameter_brace_expand: if parameter_brace_expand_word returns an
4738 error, make sure to set TEMP = 0 (to note that the variable is unset).
4739 From a report by Grisha Levit <grishalevit@gmail.com>
4740 - param_expand: if expanding $! when set -u is enabled, honor the
4741 PF_IGNUNBOUND flag and just return NULL, relying on the caller to
4742 take care of understanding that the variable is unset
4743 From a report by Grisha Levit <grishalevit@gmail.com>
4744 - parameter_brace_expand: if we are checking nullness, and we have a
4745 valid array expansion, a quoted null string resulting from the array
4746 expansion of a * or @ subscript satisfies the nullness check.
4747 From a report by Grisha Levit <grishalevit@gmail.com>
4748
4749 11/14
4750 -----
4751 aclocal.m4
4752 - BASH_CHECK_LIB_TERMCAP: add last-ditch check for libncursesw, since
4753 it's apparently the only curses library on some distributions.
4754 Report from John Frankish <john.frankish@outlook.com>
4755
4756 11/16
4757 -----
4758 bashline.c
4759 - attempt_shell_completion: allow an initial word completion to
4760 complete a partial first word (point appears in the middle of
4761 the word) before resorting to command completion. Report and fix
4762 from Luca Boccassi <bluca@debian.org>
4763
4764 [bash-5.0-beta2 frozen]
4765
4766 11/27
4767 -----
4768 bashline.c
4769 - attempt_shell_completion: better fix for problems with fix from
4770 11/16. Report and fix from Tom Ryder <tom@sanctum.geek.nz>
4771
4772 expr.c
4773 - expr_skipsubscript: fix return type. Report and fix from
4774 Andreas Schwab <schwab@linux-m68k.org>
4775
4776 11/29
4777 -----
4778 subst.c
4779 - quote_escapes_internal: refactored quote_escapes into a function
4780 that takes an additional flag saying whether or not we are going
4781 to split the result. If we are not, and CTLESC is in IFS, we quote
4782 the CTLESC (ditto for CTLNUL) to prevent it being removed when the
4783 string is dequoted.
4784 - quote_escapes: call quote_escapes_internal with FLAGS == 0
4785 - quote_rhs: new function, calls quote_escapes with FLAGS == PF_NOSPLIT2
4786 so that a CTLESC will be quoted if CTLESC is in $IFS
4787 - parameter_brace_expand_word: call quote_rhs on the value of a variable
4788 if PFLAGS includes PF_ASSIGNRHS, indicating that we will not be
4789 splitting the word, but we will be dequoting it. Fixes bug reported
4790 by Martijn Dekker <martijn@inlv.org>
4791 - param_expand: same change as for parameter_brace_expand_word
4792
4793 execute_cmd.c
4794 - execute_in_subshell: if we are running a trap (running_trap > 0),
4795 turn off the SIG_INPROGRESS and SIG_CHANGED flags for that signal
4796 by calling run_trap_cleanup and reset running_trap to 0 (watch the
4797 second part!). Tagged for bash-5.1.
4798
4799 11/30
4800 -----
4801 lib/readline/doc/rltech.texi
4802 - rl_set_keymap_name: correct typo in the name; some updates to the
4803 description that clarify usage. Report from <hirooih@gmail.com>
4804
4805 12/4
4806 ----
4807 aclocal.m4
4808 - BASH_FUNC_FNMATCH_EQUIV_FALLBACK: a test of whether fnmatch(3)
4809 understands bracket equivalence classes ([=c=]) for characters
4810 that collate with equal weights but are not identical
4811
4812 configure.ac,config.h.in
4813 - call BASH_FUNC_FNMATCH_EQUIV_FALLBACK and define
4814 FNMATCH_EQUIV_FALLBACK to 1 if it can be used for equivalence
4815 classes
4816
4817 12/5
4818 ----
4819 execute_cmd.c
4820 - eval_arith_for_expr,execute_arith_command,execute_cond_command: make
4821 sure running_trap == 0 before we reset the_printed_command_except_trap
4822 Report from Peng Yu <pengyu.ut@gmail.com>
4823
4824 lib/glob/smatch.c
4825 - _fnmatch_fallback_wc: new function, takes two wide characters c1 and
4826 c2, converts them to a pattern ([[=c2=]]) and a string (c1) for
4827 fnmatch to determine whether or not they are members of the same
4828 equivalence class
4829 - collequiv_wc: call _fnmatch_fallback_wc if rangecmp_wc returns
4830 non-zero if FNMATCH_EQUIV_FALLBACK is defined, so we know that
4831 fnmatch understands equivalence classes. Another Posix test suite
4832 issue from Martin Rehak <martin.rehak@oracle.com>
4833
4834 12/6
4835 ----
4836 redir.c
4837 - add missing cases to switch statements to shut up gcc
4838
4839 12/7
4840 ----
4841 builtins/set.def
4842 - find_minus_o_option: new helper function, returns index into
4843 o_options given option name
4844 - minus_o_option_value,set_minus_o_option: use find_minus_o_option
4845
4846 general.c
4847 - new table of variables (currently all shopt options) that are
4848 modified by going into and out of posix mode; num_posix_options()
4849 returns the number of variables
4850 - get_posix_options: fill in a bitmap passed as an argument (or return
4851 a new one) of values of posix-mode-modified variables in the table
4852 - set_posix_options: set values of posix-mode-modified variables from
4853 the table using the passed bitmap for values
4854
4855 builtins/set.def
4856 - get_current_options: make the bitmap large enough to hold the options
4857 in the set table and the table of posix-mode-modified variables; call
4858 get_posix_options to fill in those values after the values from the
4859 o_options table
4860 - set_current_options: call set_posix_options to reset the values of
4861 the posix-mode-modified variables at the end of the bitmap, after
4862 the o_options values. Fixes issue reported by PJ Eby
4863 <pje@telecommunity.com>
4864
4865 12/9
4866 ----
4867 parse.y
4868 - select_command: add two additional productions to support select
4869 commands without a word_list following the `in'. Fixes omission
4870 reported by Martijn Dekker <martijn@inlv.org>
4871
4872 12/11
4873 -----
4874 variables.c
4875 - assign_in_env: don't allow namerefs in temporary environment
4876 assignments to create variables with invalid names for export. Fixes
4877 bug reported by Grisha Levit <grishalevit@gmail.com>
4878
4879 12/14
4880 -----
4881 parse.y
4882 - don't change last_command_exit_value in the 'error yacc_EOF' production
4883 if the parser sets it to something non-zero; just make sure it
4884 indicates an error. Fixes problem with unexpected EOF in eval
4885 reported by Martijn Dekker <martijn@inlv.org>
4886
4887 12/17
4888 -----
4889 expr.c
4890 - exp2 -> expmuldiv
4891
4892 lib/sh/smatch.c
4893 - fnmatch: add extern declaration if FNMATCH_EQUIV_FALLBACK is being
4894 used
4895
4896 hashlib.c
4897 - hash_string: add FNV offset as initial value for hash instead of
4898 starting at 0, changes hash for associative arrays and requires a
4899 bunch of changes to the "right" test suite files
4900
4901 variables.c
4902 - rseed: make it explicitly 32 bits; that's all we're interested in
4903 anyway
4904
4905 12/18
4906 -----
4907
4908 variables.c
4909 - brand: add some comments, make the constants explicitly 32 bits;
4910 use signed 32-bit values for the intermediate calculations. The
4911 algorithm is still minstd
4912
4913 [bash-5.0-rc1 frozen]
4914
4915 12/21
4916 -----
4917 doc/bash.1
4918 - }1: remove macro definition; it's outlived its bugfix purpose.
4919 Report from Derek Schrock <dereks@lifeofadishwasher.com>
4920
4921 12/22
4922 -----
4923 subst.c
4924 - expand_arith_string: set W_NOTILDE in the flags so we don't perform
4925 tilde expansion at all, even for the previously-special-case array
4926 subscript expansion. Report from Bize Ma <binaryzebra@gmail.com>
4927 - expand_word_internal: take out Q_ARRAYSUB check for tilde expansion
4928
4929 12/26
4930 -----
4931 builtins/evalstring.c
4932 - parse_and_execute: if the eval builtin gets a parser error while
4933 parsing a string in posix mode, don't exit the shell if the eval
4934 was run by the command builtin. report from Martijn Dekker
4935 <martijn@inlv.org>
4936
4937 examples/loadables/{basename,dirname}.c
4938 - dirname_builtin: skip over any `--' ending the options. Report from
4939 Peng Yu <pengyu.ut@gmail.com>
4940
4941 12/27
4942 -----
4943 examples/loadables/mkdir.c
4944 - make_path: add argument noting whether or not the user specified -m;
4945 only attempt the chmod on an existing directory if the user did so
4946 - make_path: when creating intermediate directories, perform the
4947 mkdir (path, 0) and chmod separately as the posix text recommends
4948
4949 12/28
4950 -----
4951 parser.h
4952 - PST_COMMENT: new state, set when the shell is reading characters
4953 until newline as part of comment processing
4954
4955 parse.y
4956 - shell_getc: don't return a space at the end of a token if the parser
4957 is consuming a comment. Fixes bug reported by Harald van Dijk
4958 <harald@gigawatt.nl>
4959
4960 12/31
4961 -----
4962 lib/glob/glob_loop.c
4963 - INTERNAL_GLOB_PATTERN_P: revert change from 4/27 that makes this
4964 function return non-zero for a backslash in the string. Based on a
4965 report from Tom Ryder <tom@sanctum.geek.nz>
4966
4967 [bash-5.0 frozen]