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

Re: segmentation fault with {1..1234567}



On Jul 4,  7:25pm, Vincent Lefevre wrote:
}
} With zsh 5.0.5 (Debian/unstable):
} 
} $ zsh -c 'echo {1..1234567}'
} zsh: segmentation fault (core dumped)  zsh -c 'echo {1..1234567}'
} 
} If a failure is expected for any reason, it shouldn't be a crash.

Whether that expression fails depends entirely on the memory allocation
limitations of the local host.  It works fine for me.

What's the "expected" behavior of the shell when the user requests a
vast amount of memory?  How should the shell recover from running out of
memory at any arbitrary point during execution of a command or script?
Is it really helpful to trap the signal and exit *without* dumping core?



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