zsh-workers
 help / color / mirror / code / Atom feed
* Possible Bug
@ 2015-08-31 21:30 Brian Millar
  2015-09-01  5:53 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Millar @ 2015-08-31 21:30 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

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.

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

end of thread, other threads:[~2015-09-01 20:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-31 21:30 Possible Bug Brian Millar
2015-09-01  5:53 ` Bart Schaefer
2015-09-01 12:02   ` Brian Millar
2015-09-01 20:51   ` Peter Stephenson

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