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

Re: Large COLUMNS crashes zsh



>export COLUMNS=10000000000000000
>
>When doing this zsh crashes. I know it seems stupid, but wouldn't it be
>sane to ignore such large number, or simply set it to the largest
>possible?

Probably, but the trouble is there's no single "largest possible".
We've just run into a similar problem with the maximum size of arrays.
If it doesn't crash the shell, it's potentially useful, but we don't
know a priori how large that is.  Some checks on malloc might help, but
that's a big can of worms, too:  once you need it in one place, you need
it all over.  Furthermore, I've got a feeling that on many virtual
memory systems the malloc might succeed but cause havoc later.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



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