zsh-workers
 help / color / mirror / code / Atom feed
From: rjones@pobox.com
To: zsh-workers@math.gatech.edu
Subject: problem with multios on irix 5.3, zsh 3.0.1
Date: Tue, 12 Nov 1996 14:09:56 -0700	[thread overview]
Message-ID: <9611122110.AA08691@dbank> (raw)

i built zsh 3.0.1 "out-of-the-box", didn't get any compiler errors,
etc. on an irix 5.3 system.

i discovered this possible bug:

in a directory with a large number of files:

% cat < * > /dev/null

this gives a seg fault on irix.  on solaris, according to a friend, it
just stops at the 54th file.  my best guess is that the fdtable is
filling up.  there don't seem to be any upper-bounds checks in the
functions in util.c that deal with fdtable.  no lower bound check in
zclose, either, so sometimes max_zsh_fd can go beyond the end of the
array or go negative (unless there's some invariant condition that keeps
it from going negative.  some debugging seemed to indicate that it was
going neg, though.).

while trying to track down the problem, i also found some code in
exec.c that looks like this:

fdtable[pipes[!out]] = 2;

it may be ansi-acceptable to trust "!" to always return 0 or 1, but
this would probably be easier to read if it were

fdtable[pipes[out ? 0 : 1]] = 2;

that's personal preference, of course.

thanks,
ray jones


             reply	other threads:[~1996-11-12 21:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-12 21:09 rjones [this message]
1996-11-12 21:29 ` Zoltan Hidvegi
1996-11-12 21:52 rjones

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=9611122110.AA08691@dbank \
    --to=rjones@pobox.com \
    --cc=zsh-workers@math.gatech.edu \
    /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).