Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Possible Bug
- X-seq: zsh-workers 36350
- From: Brian Millar <D00144121@xxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Possible Bug
- Date: Mon, 31 Aug 2015 21:30:34 +0000
- Accept-language: en-US
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=D00144121@xxxxxxxxxxxxxxx; zsh.org; dkim=none (message not signed) header.d=none;zsh.org; dmarc=none action=none header.from=student.dkit.ie;
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:23
- Thread-index: AQHQ5DOVJwIPQjSb+0y4S5sk9GqIOQ==
- Thread-topic: Possible Bug
Hi, I think I may have discovered a bug in ZSH.
I was trying to install a prompt theme and I mixed things up moved things and named things wrong.
This resulted in the file wanted by the set_prompt actually being a directory.
ZSH would crash on start, if I ran it on top of another shell I could see the error was "set_prompt:100: fatal error: out of memory".
I traced it and found that the open() syscall ran on the directory, the result was passed to lseek() with argument SEEK_END which I don't think makes any sense for a directory.
lseek() returned an astronomically huge value which was passed to mmap() as bytes to allocate. Thats when the crash happens.
I talked to some kernel folks who say you should check that the file coming from open() is not anything other than a normal file.
If this is not a ZSH bug I'm sorry for wasting your time.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author