zsh-users
 help / color / mirror / code / Atom feed
From: Miek Gieben <miek@miek.nl>
To: Zsh users list <zsh-users@sunsite.dk>
Subject: Re: Large COLUMNS crashes zsh
Date: Fri, 5 May 2006 17:33:22 +0200	[thread overview]
Message-ID: <20060505153322.GE8197@miek.nl> (raw)
In-Reply-To: <EXCHANGE03RUlRWXopo0000112a@exchange03.csr.com>

[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]

[On 05 May, @16:32, Peter Stephenson wrote in "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.

bash seems handle this just fine. And it resets the value to something
more sane (don't know if that is a bug or feature):

$ export COLUMNS=10000000000000000
$ echo $COLUMNS
10000000000000000
$ ls
...bunch of files...
$ echo $COLUMNS
100
$

This is with bash3. Zsh on the other hand is trying to trash my
machine :)

--
grtz,
  - Miek

  http://www.miek.nl              http://www.nlnetlabs.nl
  PGP: 6A3C F450 6D4E 7C6B C23C  F982 258B 85CF 3880 D0F6

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

  reply	other threads:[~2006-05-05 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-05 14:19 Mads Martin Joergensen
2006-05-05 14:32 ` Peter Stephenson
2006-05-05 15:33   ` Miek Gieben [this message]
2006-05-06 12:51     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060505153322.GE8197@miek.nl \
    --to=miek@miek.nl \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).