Re: Segmentation fault when -x is added and variable contains nulls

2014-02-06 Thread Chet Ramey
On 2/5/14 10:51 PM, Dan Jacobson wrote: > # su - nobody > No directory, logging in with HOME=/ > $ cat /tmp/r > LC_CTYPE=zh_TW.UTF-8 N=$(echo 統一|iconv -t big5 -f utf-8) sh -xc ': $N' > $ sh /tmp/r > /tmp/r: line 1: 4551 Segmentation fault LC_CTYPE=zh_TW.UTF-8 N=$(echo > 統一|iconv -t big5 -f u

Re: Segmentation fault when -x is added and variable contains nulls

2014-02-06 Thread Greg Wooledge
On Thu, Feb 06, 2014 at 11:51:25AM +0800, Dan Jacobson wrote: > # su - nobody > No directory, logging in with HOME=/ > $ cat /tmp/r > LC_CTYPE=zh_TW.UTF-8 N=$(echo ??|iconv -t big5 -f utf-8) sh -xc ': $N' > $ sh /tmp/r > /tmp/r: line 1: 4551 Segmentation fault LC_CTYPE=zh_TW.UTF-8 N=$(ech

Re: declare -ia does not enfore integer type on initialisation

2014-02-06 Thread Chet Ramey
On 2/5/14 5:25 PM, Peggy Russell wrote: >>> Description: >>> declare -ia not enforced if variable is initiated using = >> >> Correct; bash applies the integer attribute after the variable assignment. >> It has been this way since arrays were introduced (well, at least as far >> back as bash-3.2; th

Re: Segmentation fault when -x is added and variable contains nulls

2014-02-06 Thread Pierre Gaston
On Thu, Feb 6, 2014 at 3:38 PM, Chet Ramey wrote: > On 2/5/14 10:51 PM, Dan Jacobson wrote: > > # su - nobody > > No directory, logging in with HOME=/ > > $ cat /tmp/r > > LC_CTYPE=zh_TW.UTF-8 N=$(echo 統一|iconv -t big5 -f utf-8) sh -xc ': $N' > > $ sh /tmp/r > > /tmp/r: line 1: 4551 Segmentation

Re: Segmentation fault when -x is added and variable contains nulls

2014-02-06 Thread Pierre Gaston
On Thu, Feb 6, 2014 at 4:07 PM, Pierre Gaston wrote: > > > > On Thu, Feb 6, 2014 at 3:38 PM, Chet Ramey wrote: > >> On 2/5/14 10:51 PM, Dan Jacobson wrote: >> > # su - nobody >> > No directory, logging in with HOME=/ >> > $ cat /tmp/r >> > LC_CTYPE=zh_TW.UTF-8 N=$(echo 統一|iconv -t big5 -f utf-8)

Re: Segmentation fault when -x is added and variable contains nulls

2014-02-06 Thread Andreas Schwab
Greg Wooledge writes: > On Thu, Feb 06, 2014 at 11:51:25AM +0800, Dan Jacobson wrote: >> # su - nobody >> No directory, logging in with HOME=/ >> $ cat /tmp/r >> LC_CTYPE=zh_TW.UTF-8 N=$(echo ??|iconv -t big5 -f utf-8) sh -xc ': $N' >> $ sh /tmp/r >> /tmp/r: line 1: 4551 Segmentation fault

Re: Segmentation fault when -x is added and variable contains nulls

2014-02-06 Thread Dan Jacobson
What a clod I was, thinking @ was ^@. OK glad you guys are hot on the trail.

Re: Bad file descriptor with coproc and pipe

2014-02-06 Thread Chet Ramey
On 2/5/14 4:37 PM, Michal Sojka wrote: >> Bash closes file descriptors associated with coprocs in child processes, >> since they are pipes. It's even more careful when those child processes >> are part of pipelines. It's really a bad idea to have pipe file >> descriptors open in multiple process

Re: Segmentation fault when -x is added and variable contains nulls

2014-02-06 Thread Chet Ramey
On 2/6/14 9:07 AM, Pierre Gaston wrote: > > With bash 3.2.25(1)-release > > $ LC_CTYPE=zh_TW.UTF-8 N=$(echo 統一|iconv -t big5 -f utf-8) sh -xc ': $N' > + : $'\262\316\244@' > > With bash-rc1 I can reproduce it with: bash -xc $': \262\316\244@' Thanks for the reproducer. Chet -- ``The lyf so

Re: Segmentation fault when -x is added and variable contains nulls

2014-02-06 Thread Chet Ramey
On 2/5/14 10:51 PM, Dan Jacobson wrote: > # su - nobody > No directory, logging in with HOME=/ > $ cat /tmp/r > LC_CTYPE=zh_TW.UTF-8 N=$(echo 統一|iconv -t big5 -f utf-8) sh -xc ': $N' > $ sh /tmp/r > /tmp/r: line 1: 4551 Segmentation fault LC_CTYPE=zh_TW.UTF-8 N=$(echo > 統一|iconv -t big5 -f u

Hitting C-c C-c in Emacs' *shell* causes segmentation fault

2014-02-06 Thread Dan Jacobson
Dear Bug-Bash gentlemen, http://debbugs.gnu.org/16665 says it seems like a bash bug. Please have a look if you are also an emacs person.

Re: Hitting C-c C-c in Emacs' *shell* causes segmentation fault

2014-02-06 Thread Dan Jacobson
> "CR" == Chet Ramey writes: CR> OK, I'll bite. What is C-c C-c supposed to do? It looks like it just CR> spews a bunch of garbage to your screen. Is that the intent? C-c C-c runs the command comint-interrupt-subjob, which is an interactive compiled Lisp function in `comint.el'. (comint-

Re: Hitting C-c C-c in Emacs' *shell* causes segmentation fault

2014-02-06 Thread Chris Down
On 2014-02-06 22:16:56 -0500, Chet Ramey wrote: > OK, I'll bite. What is C-c C-c supposed to do? It looks like it just > spews a bunch of garbage to your screen. Is that the intent? According to the Emacs manual[0]: > Interrupt the shell or its current subjob if any > (comint-interrupt-subjob)

Re: Hitting C-c C-c in Emacs' *shell* causes segmentation fault

2014-02-06 Thread Chet Ramey
On 2/6/14, 6:11 PM, Dan Jacobson wrote: > Dear Bug-Bash gentlemen, > http://debbugs.gnu.org/16665 says it seems like a bash bug. > Please have a look if you are also an emacs person. OK, I'll bite. What is C-c C-c supposed to do? It looks like it just spews a bunch of garbage to your screen. Is

Re: Hitting C-c C-c in Emacs' *shell* causes segmentation fault

2014-02-06 Thread Glenn Morris
Chet Ramey wrote: > What is C-c C-c supposed to do? It pretty much just sends SIGINT.