"builtin printf '\uFF8E'" generates broken surrogate pairs in Cygwin

2016-11-05 Thread Koichi MURASE
Hello, let me send a bashbug report as follows. Configuration Information [Automatically generated, do not change]: Machine: i686 OS: cygwin Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -D

Re: memory leak in execute_simple_command when dofork is true

2016-11-05 Thread Chet Ramey
On 11/4/16 2:02 AM, Eduardo A. Bustamante López wrote: > Actually, there are more leaks in execute_cmd.c, I'm just going to list them > here. Thanks for the pointers, no pun intended. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis''

Re: Bug with && in piped functions in minimal-config bash

2016-11-05 Thread Chet Ramey
On 11/4/16 5:41 PM, Martijn Dekker wrote: > My development with Modernish just exposed the following bug on bash > 4.4.0(1)-maint, bash-20161028 snapshot, compiled with > --enable-minimal-config --enable-alias: > > $ fn() { false && echo bug || echo ok; } > $ fn > ok > $ fn > ok > $ fn | cat > ok

Re: 'kill -l' outputs SIG prefix if job control not compiled in

2016-11-05 Thread Chet Ramey
On 11/4/16 6:30 PM, Martijn Dekker wrote: > Normal bash: > > $ kill -l 141 > PIPE > > Bash compiled with --enable-minimal-config --enable-alias: > > $ kill -l 141 > SIGPIPE > > That SIG prefix shouldn't be there. (Enabling POSIX mode makes no > difference to the output.) Bash's minimal configu

Re: [bug] [[ $'\Ux' = $'\Ux' ]] returns false for some values of x in some locales

2016-11-05 Thread Chet Ramey
On 11/4/16 8:29 AM, Stephane Chazelas wrote: > Most of the problematic characters are the ones ending in 0x5c > (which happens to be backslash in ASCII (or in BIG5-HKSCS when > standing alone). There are a couple of issues here. The first is that the glibc locales really do have a problem for ca

Why does bash use xmalloc?

2016-11-05 Thread Peng Yu
Hi, The following example shows that bash uses xmalloc. But it seems that using xmalloc is not a good practice. Is it better to use malloc instead of xmalloc? In this test case, after `./main 100` failed I still want to run the rest commands. So it sounds like malloc is better. http://stackove