zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: schaefer@nbn.com
Cc: stucki@math.fu-berlin.de, zsh-workers@math.gatech.edu
Subject: Re: Strange coredump in new zsh-3.0.1 on Sunos4.1.3 (FIXED)
Date: Sun, 3 Nov 1996 22:25:04 +0100 (MET)	[thread overview]
Message-ID: <199611032125.WAA00362@hzoli.ppp.cs.elte.hu> (raw)
In-Reply-To: <961103104434.ZM27585@candle.brasslantern.com> from Bart Schaefer at "Nov 3, 96 10:44:34 am"

> On Nov 3,  4:37pm, C. v. Stuckrad wrote:
> } Subject: Re: Strange coredump in new zsh-3.0.1 on Sunos4.1.3 (FIXED)
> }
> } OK, setting OPEN_MAX to 64 (and applying Zoltan's fix too)
> } did get rid of the bug. 
> 
> I'd be curious to know if you tried the two fixes separately.  I don't
> see how decrementing max_zsh_fd below zero in that loop could possibly
> change it to 16777234 ( == (1<<24)+18, which is a lot of decrements);
> but taking the bytes in 16777234 as an array of chars (char fdtable[])
> yields "\01\0\0\021" which looks suspiciously like what you'd get if
> you started with max_zsh_fd == 18 and stuffed 1 into the first byte.

I guess that the problem is that due to the incorrect OPEN_MAX value an
fdtable[OPEN_MAX] = 1 assignment happens somewhere.  max_zsh_fd comes right
after the fdtable array so this assignment overwrites the first byte of
max_zsh_fd.  On big endian machines like the sparc this causes exactly the
described problem.  My bugfix has nothing to do with that.  That bug I
fixed probably can never cause any real problems (it's been there for a
while now and noone noticed that) since max_zsh_fd decrements stop at the
first non-zero byte and max_zsh_fd is never used for writing.

Zoltan


  reply	other threads:[~1996-11-03 23:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-02 15:25 Strange coredump in new zsh-3.0.1 on Sunos4.1.3 C. v. Stuckrad
1996-11-02 15:30 ` Strange coredump in new zsh-3.0.1 on Sunos4.1.3 (2) C. v. Stuckrad
1996-11-02 18:21   ` Bart Schaefer
1996-11-03 15:37     ` Strange coredump in new zsh-3.0.1 on Sunos4.1.3 (FIXED) C. v. Stuckrad
1996-11-03 18:44       ` Bart Schaefer
1996-11-03 21:25         ` Zoltan Hidvegi [this message]
1996-11-02 22:18 ` Strange coredump in new zsh-3.0.1 on Sunos4.1.3 Zoltan Hidvegi

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=199611032125.WAA00362@hzoli.ppp.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=schaefer@nbn.com \
    --cc=stucki@math.fu-berlin.de \
    --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).