Bug 1356388

Summary: zsh crashes with out of memory error
Product: Red Hat Enterprise Linux 7 Reporter: Manish Saxena <msaxena>
Component: zshAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Jan Kepler <jkejda>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: jkejda, kdudka, rpiddapa
Target Milestone: rcKeywords: Patch, Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: zsh-5.0.2-25.el7 Doc Type: Bug Fix
Doc Text:
Needless to document.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 23:03:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Manish Saxena 2016-07-14 04:09:00 UTC
Description of problem:

Tab completion after a subshell command causes ZSH to crash:

$ zsh
$ autoload -U compinit && compinit -u
$ echo $(echo x)<TAB>
zsh: fatal error: out of memory

GDB Backtrace:

#0  __GI_exit (status=1) at exit.c:99
#1  0x0000000000453181 in zalloc ()
#2  0x00007ffff0309a54 in do_completion () from /usr/lib64/zsh/5.0.2/zsh/complete.so
#3  0x00007ffff054c3ef in docomplete () from /usr/lib64/zsh/5.0.2/zsh/zle.so
#4  0x00007ffff0548d10 in completecall () from /usr/lib64/zsh/5.0.2/zsh/zle.so
#5  0x00007ffff053a2b6 in execzlefunc () from /usr/lib64/zsh/5.0.2/zsh/zle.so
#6  0x00007ffff053a5b9 in zlecore () from /usr/lib64/zsh/5.0.2/zsh/zle.so
#7  0x00007ffff053b1dd in zleread () from /usr/lib64/zsh/5.0.2/zsh/zle.so
#8  0x00000000004405d2 in zleentry ()
#9  0x00000000004419d6 in ingetc ()
#10 0x000000000043abf6 in ihgetc ()
#11 0x000000000044b91e in zshlex ()
#12 0x0000000000469036 in parse_event ()
#13 0x000000000043dc3e in loop ()
#14 0x0000000000440fce in zsh_main ()
#15 0x00007ffff6ecab15 in __libc_start_main (main=0x40ed00 <main>, argc=1, ubp_av=0x7fffffffdb08, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffdaf8) at libc-start.c:274
#16 0x000000000040ed31 in _start ()

Version-Release number of selected component (if applicable):
RHEL7
zsh-5.0.2-14.el7_2.2.x86_64

How reproducible:
Everytime

Steps to Reproduce:
$ zsh
$ autoload -U compinit && compinit -u
$ echo $(echo x)<TAB>
zsh: fatal error: out of memory

Actual results:
$ echo $(echo x)<TAB>
zsh: fatal error: out of memory

Expected results:
There should be no error

Additional info:

Comment 2 Kamil Dudka 2016-07-14 12:25:19 UTC
This is yet another regression caused by the fix for bug #1241023.

The following upstream commit fixes it:

https://sourceforge.net/p/zsh/code/ci/db05cc51

Comment 4 Lukáš Nykrýn 2016-07-14 12:27:20 UTC
devel_ack for 7.3

Comment 11 errata-xmlrpc 2016-11-03 23:03:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2152.html