Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: segmentation fault with {1..1234567}



On 2014-07-06 01:39:16 +0200, Vincent Lefevre wrote:
> On 2014-07-05 09:57:03 -0700, Bart Schaefer wrote:
> > On Jul 5,  1:12pm, Vincent Lefevre wrote:
> > }
> > } > Whether that expression fails depends entirely on the memory allocation
> > } > limitations of the local host.  It works fine for me.
> > } 
> > } That's not a memory allocation problem: it fails on a machine
> > } with 24GB!
> > 
> > Then it's probably a per-process resource limit problem.
> 
> No, I don't have any per-process limitation on the memory.

Note also that the bug is specific to zsh. Other shells work fine:

$ dash -c 'echo `seq 1 1234567` | wc'
      1 1234567 8765432
$ ksh93 -c 'echo `seq 1 1234567` | wc'
      1 1234567 8765432
$ mksh -c 'echo `seq 1 1234567` | wc'
      1 1234567 8765432
$ bash -c 'echo `seq 1 1234567` | wc'
      1 1234567 8765432
$ posh -c 'echo `seq 1 1234567` | wc'
      1 1234567 8765432

while with zsh:

$ zsh -c 'echo `seq 1 1234567` | wc'
      0       0       0

Removing the "| wc" shows that this is due to a segmentation fault.

I've reported the bug on the Debian BTS:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753906

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author