From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12147 invoked by alias); 20 Jan 2014 00:02:45 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32293 Received: (qmail 7171 invoked from network); 20 Jan 2014 00:02:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140119160238.ZM5850@torch.brasslantern.com> Date: Sun, 19 Jan 2014 16:02:38 -0800 In-reply-to: <20140119221310.GA502@ruderich.org> Comments: In reply to Simon Ruderich "Re: segfault with exceedingly long path" (Jan 19, 11:13pm) References: <20140118002033.GY27889@sym.noone.org> <140117174902.ZM7366@torch.brasslantern.com> <20140119191048.018a051a@pws-pc.ntlworld.com> <140119133550.ZM5354@torch.brasslantern.com> <20140119221310.GA502@ruderich.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: segfault with exceedingly long path MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 19, 11:13pm, Simon Ruderich wrote: } } So we could do that in small steps, e.g. first chdir(2) to a } directory < PATH_MAX bytes deep, then from there to the next } directory < PATH_MAX bytes deep and so on until we get down to } the real directory. Yes, but that doesn't even begin to address all the other places where very long paths become an issue. Would redirections have to implcitly chdir along the pathname until they got "close enough" to pass the path tail to open()? Can you put a ridiculously long path into $path or $fpath or $module_path? $TMPPREFIX? $ZDOTDIR? What does [[ -d $longpath ]] do? zstat $longpath? ${(A)longpath}? Can you even do an execve() when $#PWD is longer than PATH_MAX? I don't think we want to let this can of worms out of Pandora's box, or we'll be chasing geese until the cows come home to roost.