Re: Bash-5.0-beta2 available for download

2018-11-27 Thread Chet Ramey
On 11/27/18 3:44 PM, G. Branden Robinson wrote:
> gcc -c   -DHAVE_CONFIG_H -DSHELL  -I. -I..  -I.. -I../include -I../lib -I.  
> -DDEBUG  -g -O2 -Wno-parentheses -Wno-format-security evalstring.c
> evalstring.c: In function ‘parse_and_execute_cleanup’:
> evalstring.c:150:7: warning: implicit declaration of function 
> ‘unfreeze_jobs_list’; did you mean ‘unfreeeze_jobs_list’? 
> [-Wimplicit-function-declaration]
>unfreeze_jobs_list ();
>^~
>unfreeeze_jobs_list

I'm going to have to give up on clang; it didn't catch that.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



signature.asc
Description: OpenPGP digital signature


Re: Bash-5.0-beta2 available for download

2018-11-27 Thread G. Branden Robinson
gcc -c   -DHAVE_CONFIG_H -DSHELL  -I. -I..  -I.. -I../include -I../lib -I.  
-DDEBUG  -g -O2 -Wno-parentheses -Wno-format-security evalstring.c
evalstring.c: In function ‘parse_and_execute_cleanup’:
evalstring.c:150:7: warning: implicit declaration of function 
‘unfreeze_jobs_list’; did you mean ‘unfreeeze_jobs_list’? 
[-Wimplicit-function-declaration]
   unfreeze_jobs_list ();
   ^~
   unfreeeze_jobs_list

--- jobs.h.orig 2018-11-27 18:35:43.205649329 -0500
+++ jobs.h  2018-11-27 18:35:51.049574540 -0500
@@ -260,7 +260,7 @@
 extern void run_sigchld_trap __P((int));
 
 extern int freeze_jobs_list __P((void));
-extern void unfreeeze_jobs_list __P((void));
+extern void unfreeze_jobs_list __P((void));
 extern void set_jobs_list_frozen __P((int));
 extern int set_job_control __P((int));
 extern void without_job_control __P((void));

-- 
Regards,
Branden


signature.asc
Description: PGP signature


Re: Bash-5.0-beta2 available for download

2018-11-27 Thread Chet Ramey
On 11/27/18 2:55 PM, Andreas Schwab wrote:

> -static char *
> +static int
>  expr_skipsubscript (vp, cp)

Thanks.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: Bash-5.0-beta2 available for download

2018-11-27 Thread Andreas Schwab
Index: bash-5.0-beta2/expr.c
===
--- bash-5.0-beta2.orig/expr.c
+++ bash-5.0-beta2/expr.c
@@ -342,7 +342,7 @@ expr_bind_variable (lhs, rhs)
 #if defined (ARRAY_VARS)
 /* This is similar to the logic in arrayfunc.c:valid_array_subscript when
you pass VA_NOEXPAND. */
-static char *
+static int
 expr_skipsubscript (vp, cp)
  char *vp, *cp;
 {

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



Bash-5.0-beta2 available for download

2018-11-27 Thread Chet Ramey
The second beta release of bash-5.0 is now available with the URL

ftp://ftp.cwru.edu/pub/bash/bash-5.0-beta2.tar.gz

and from the bash-5.0-testing branch in the bash git repository   
(http://git.savannah.gnu.org/cgit/bash.git/log/?h=bash-5.0-testing).  

This tar file includes the formatted documentation (you should be able to
generate updated versions yourself).

This release fixes several outstanding bugs in bash-4.4 and introduces several
new features.  The most significant bug fixes are an overhaul of how
nameref variables resolve and a number of potential out-of-bounds memory
errors discovered via fuzzing. There are a number of changes to the
expansion of $@ and $* in various contexts where word splitting is not
performed to conform to a Posix standard interpretation, and additional
changes to resolve corner cases for Posix conformance.

The most notable new features are several new shell variables: BASH_ARGV0,
EPOCHSECONDS, and EPOCHREALTIME. The `history' builtin can remove ranges of
history entries and understands negative arguments as offsets from the end
of the history list. There is an option to allow local variables to inherit
the value of a variable with the same name at a preceding scope. There is
a new shell option that, when enabled, causes the shell to attempt to
expand associative array subscripts only once (this is an issue when they
are used in arithmetic expressions).  The `globasciiranges' shell option
is now enabled by default; it can be set to off by default at configuration
time.

There are a few incompatible changes between bash-4.4 and bash-5.0. The
changes to how nameref variables are resolved means that some uses of
namerefs will behave differently, though I have tried to minimize the
compatibility issues. By default, the shell only sets BASH_ARGC and
BASH_ARGV at startup if extended debugging mode is enabled; it was an
oversight that it was set unconditionally and caused performance issues
when scripts were passed large numbers of arguments.

`bashbug' may be used to report bugs with this version.  It will send
mail to chet.ra...@case.edu if the shell's `release status' is alpha or
beta.

As always, thanks for your help.

Chet

+== CHANGES ==+
This document details the changes between this version, bash-5.0-beta2, and
the previous version, bash-5.0-beta.

1. Changes to Bash

a. Fixed a bug that could cause a seg fault while parsing a subshell command
   inside a command substitution.

b. Fixed several small memory leaks uncovered by coverity.

c. Fixed a problem with command substitution inside an interactive shell that
   could cause the parent to receive a SIGHUP.

d. Fixed a problem with using `*' and `@' as subscripts when assigning values
   to an associative array with assoc_expand_once enabled.

e. Fixed a bug that could cause a huge memory allocation when completing a
   word beginning with an invalid tilde expansion.

f. Cleaned up some incompatiblities with bash-4.4 when expanding indexed array
   subscripts used in arithmetic expansions when assoc_expand_once is enabled.

g. The ${parameter@a} expansion will display attributes even if `parameter' is
   unset.

h. Fixed a bug that caused the output of `set' to cut off some variables before
   printing the value.

i. Treat a failure to assign a variable when using the ${x:=value} expansion
   as an expansion error, so non-interactive posix-mode shells exit

j. Fixed a problem when expanding $* in a context where word splitting is not
   performed when IFS is NULL.

k. Temp files used to store here documents are forced readable, no matter what
   the user's umask says.

l. Fixed a problem where an interrupted brace expansion could cause the shell
   to attempt to free an invalid memory location.

m. Make sure to check for any terminating signals after running a trap
   handler; don't wait until the next time we process traps.

n. Fixed a bug that caused "return" to act like a special builtin with respect
   to variable assignments even when preceded by "command".

o. POSIX-mode shells now return failure if the cd builtin fails due to the
   absolute directory name being longer than PATH_MAX, instead of trying
   again with a relative pathname.

p. Fixed a problem with FUNCNAME occasionally being visible when not executing
   a shell function.

q. Fixed a problem with the expansions performed on the WORD in the case
   command.

r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during
   word splitting and the read builtin.

s. Fixed a problem with expanding an array with subscript `*' when all the
   elements expand to the empty string, and making sure the expansion honors
   the `:' specifier.

2. Changes to Readline

a. Fixed a bug with adding multibyte characters to an incremental search string.

b. Fixed a bug with redoing text insertions in vi mode.

c. Fixed a bug with pasting text into an incremental search string if bracketed
   paste mode is enabled. ESC cannot be one o