zsh-workers
 help / color / mirror / code / Atom feed
* 4.0.6 bug: out of memory with ulimit
@ 2002-12-28  4:37 Carlos Carvalho
  2002-12-31 16:04 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos Carvalho @ 2002-12-28  4:37 UTC (permalink / raw)
  To: zsh-workers

Hi people,

Season's greetings to you all.

Time for a report after 9 years away from zsh development...
It's nice to see that many people of that time are still around :-)

I've stumbled on what I consider a bug in 4.0.6: if I use this command
in /etc/zshenv

  ulimit -HS -d 1048576 -v 1048576

I get "/etc/zsh/zshrc:-1: fatal error: out of memory" when I start the
executable. This doesn't happen with 4.0.4. I tried 4.0.6 with the
original distribution and with Debian's patches. The Debian binary,
which uses dynamic loading, also chokes. The problem goes away if I
remove the -v 1048576 portion of the line.

This is the config I used:

./configure --prefix=/usr --bindir=/bin --mandir=/usr/share/man --infodir=/usr/share/info --enable-maildir-support --enable-max-jobtable-size=256 --enable-function-subdirs --enable-site-fndir=/usr/local/share/zsh/site-functions --with-curses-terminfo --enable-etcdir=/etc/zsh --disable-dynamic

Independently of my .zshenv and other init files, I find it strange
that the program doesn't run because the memory limitation is not at
all stringent.

If there's something else useful to inform please tell me.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 4.0.6 bug: out of memory with ulimit
  2002-12-28  4:37 4.0.6 bug: out of memory with ulimit Carlos Carvalho
@ 2002-12-31 16:04 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2002-12-31 16:04 UTC (permalink / raw)
  To: zsh-workers

On Dec 28,  2:37am, Carlos Carvalho wrote:
}
} I've stumbled on what I consider a bug in 4.0.6: if I use this command
} in /etc/zshenv
} 
}   ulimit -HS -d 1048576 -v 1048576
} 
} I get "/etc/zsh/zshrc:-1: fatal error: out of memory"

This is a bug in the C preprocessor #ifdefs in the code that interprets
the ulimit command.  It's pretty tangled what with trying to compensate
for about three different possible implementations, and we haven't got
it straightened out yet.  The effect of the bug is that the argument to 
-v is interpreted as bytes rather than kbytes.

If you use the "limit" command instead of "ulimit" this bug does not
occur:

    limit -hs datasize 1048576 vmemorysize 1048576

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-12-31 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-28  4:37 4.0.6 bug: out of memory with ulimit Carlos Carvalho
2002-12-31 16:04 ` Bart Schaefer

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).