From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id IAA13205 for ; Wed, 13 Nov 1996 08:12:54 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id QAA14683; Tue, 12 Nov 1996 16:10:05 -0500 (EST) Resent-Date: Tue, 12 Nov 1996 16:10:05 -0500 (EST) Message-Id: <9611122110.AA08691@dbank> To: zsh-workers@math.gatech.edu Subject: problem with multios on irix 5.3, zsh 3.0.1 From: rjones@pobox.com Reply-To: rjones@pobox.com Date: Tue, 12 Nov 1996 14:09:56 -0700 Sender: rjones@ptc.com Resent-Message-ID: <"NK22I2.0.Ib3.iUEYo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2382 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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