Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 4.0.6 bug: out of memory with ulimit



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   



Messages sorted by: Reverse Date, Date, Thread, Author