zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Constant initial fdtable_size
@ 2001-10-22 14:48 Bart Schaefer
  2001-10-22 14:57 ` Peter Stephenson
  0 siblings, 1 reply; 9+ messages in thread
From: Bart Schaefer @ 2001-10-22 14:48 UTC (permalink / raw)
  To: zsh-workers; +Cc: Matthew Braun

This is intended for the 4-0-patches branch; it should fix the crash reported
in 16082.  Presumably it's sufficiently noncontroversial to commit?

Index: Src/init.c
===================================================================
--- Src/init.c	2001/09/24 15:40:12	1.6
+++ Src/init.c	2001/10/22 14:41:42
@@ -1190,7 +1190,8 @@
 	  break;
     } while (zsh_name);
 
-    fdtable_size = zopenmax();
+    /* Not zopenmax() here: it may return a number too big for zcalloc(). */
+    fdtable_size = 256; /* This grows as necessary, see utils.c:movefd(). */
     fdtable = zcalloc(fdtable_size);
 
     createoptiontable();

-- 
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] 9+ messages in thread

end of thread, other threads:[~2001-10-23 15:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-22 14:48 PATCH: Constant initial fdtable_size Bart Schaefer
2001-10-22 14:57 ` Peter Stephenson
2001-10-22 15:17   ` Anything left (Re: PATCH: Constant initial fdtable_size) Bart Schaefer
2001-10-22 15:37     ` Bart Schaefer
2001-10-22 16:57     ` Oliver Kiddle
2001-10-22 17:09       ` Peter Stephenson
2001-10-23  6:03     ` Borsenkow Andrej
2001-10-23 14:00       ` Borsenkow Andrej
2001-10-23 15:19         ` PATCH: Infinite loop in `case' with xtrace 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).