Bug 1722703 - [abrt] zsh: zle_setline(): zsh killed by SIGSEGV
Summary: [abrt] zsh: zle_setline(): zsh killed by SIGSEGV
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: zsh
Version: 30
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:96fa22f15d3c4c861317da7d56e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-21 04:09 UTC by rea.aft
Modified: 2020-09-14 06:51 UTC (History)
5 users (show)

Fixed In Version: zsh-5.7.1-4.fc31 zsh-5.7.1-4.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-04 01:13:37 UTC
Type: ---
Embargoed:
kdudka: needinfo-


Attachments (Terms of Use)
File: backtrace (26.88 KB, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: cgroup (331 bytes, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: core_backtrace (12.16 KB, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: cpuinfo (1.38 KB, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: dso_list (1.75 KB, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: environ (4.17 KB, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: exploitable (82 bytes, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: limits (1.29 KB, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: maps (11.28 KB, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: mountinfo (6.17 KB, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: open_fds (279 bytes, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details
File: proc_pid_status (1.33 KB, text/plain)
2019-06-21 04:09 UTC, rea.aft
no flags Details

Description rea.aft 2019-06-21 04:09:06 UTC
Description of problem:
Pasting a string into shell, using ctrl+alt+v.

Example: In the line there was this already typed:

export DATABASE_URL=

then i pasted this:
postgres://user:password@localhost/pro_db_dev

and it crashed.

Version-Release number of selected component:
zsh-5.7.1-1.fc30

Additional info:
reporter:       libreport-2.10.0
backtrace_rating: 4
cmdline:        /bin/zsh
crash_function: zle_setline
executable:     /usr/bin/zsh
journald_cursor: s=fbb0c4301664435eb90b8d39bccce2fa;i=622e0;b=d79e15fac82b4acdaa1b80aa5877907a;m=8cc54d3ab;t=58bcd85431475;x=f7ad7eff22f98c5c
kernel:         5.1.11-300.fc30.x86_64
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (10 frames)
 #0 zle_setline at zle_hist.c:765
 #1 unapplychange at zle_utils.c:1610
 #2 undo at zle_utils.c:1592
 #3 execzlefunc at zle_main.c:1467
 #4 bin_zle_call at zle_thingy.c:790
 #5 execbuiltin at builtin.c:507
 #6 execcmd_exec at exec.c:4090
 #7 execpline2 at exec.c:1927
 #8 execpline at exec.c:1658
 #9 execlist at exec.c:1413

Comment 1 rea.aft 2019-06-21 04:09:10 UTC
Created attachment 1582991 [details]
File: backtrace

Comment 2 rea.aft 2019-06-21 04:09:11 UTC
Created attachment 1582992 [details]
File: cgroup

Comment 3 rea.aft 2019-06-21 04:09:13 UTC
Created attachment 1582993 [details]
File: core_backtrace

Comment 4 rea.aft 2019-06-21 04:09:14 UTC
Created attachment 1582994 [details]
File: cpuinfo

Comment 5 rea.aft 2019-06-21 04:09:16 UTC
Created attachment 1582995 [details]
File: dso_list

Comment 6 rea.aft 2019-06-21 04:09:17 UTC
Created attachment 1582996 [details]
File: environ

Comment 7 rea.aft 2019-06-21 04:09:18 UTC
Created attachment 1582997 [details]
File: exploitable

Comment 8 rea.aft 2019-06-21 04:09:20 UTC
Created attachment 1582998 [details]
File: limits

Comment 9 rea.aft 2019-06-21 04:09:22 UTC
Created attachment 1582999 [details]
File: maps

Comment 10 rea.aft 2019-06-21 04:09:23 UTC
Created attachment 1583000 [details]
File: mountinfo

Comment 11 rea.aft 2019-06-21 04:09:24 UTC
Created attachment 1583001 [details]
File: open_fds

Comment 12 rea.aft 2019-06-21 04:09:26 UTC
Created attachment 1583002 [details]
File: proc_pid_status

Comment 13 Kamil Dudka 2019-06-25 17:20:28 UTC
unapplychange() as well as applychange() calls:

    zle_setline(quietgethist(ch->hist));

quietgethist() may return NULL in some cases but zle_setline() expects non-NULL argument.

But I am not sure how this case should be handled, will need to ask upstream...

Comment 14 Kamil Dudka 2019-06-26 10:23:32 UTC
I have proposed a patch upstream:

http://www.zsh.org/mla/workers/2019/msg00485.html

Comment 15 Kamil Dudka 2019-06-28 08:08:12 UTC
Neither zsh upstream is able to reproduce the crash.  Do you use any zsh plug-ins or some special setup?

Comment 16 Kamil Dudka 2019-07-23 13:48:49 UTC
A new version of the patch proposed upstream:

http://www.zsh.org/mla/workers/2019/msg00602.html

Comment 17 Kamil Dudka 2019-07-25 17:31:25 UTC
upstream commit:

https://github.com/zsh-users/zsh/commit/f9cd2187

Comment 18 Kamil Dudka 2019-07-26 15:26:15 UTC
Oops, I messed it up.  A fixup patch will be needed:

http://www.zsh.org/mla/workers/2019/msg00618.html

Comment 19 Kamil Dudka 2019-07-26 16:45:01 UTC
(In reply to Kamil Dudka from comment #18)
> Oops, I messed it up.  A fixup patch will be needed:
> 
> http://www.zsh.org/mla/workers/2019/msg00618.html

upstream commit: https://github.com/zsh-users/zsh/commit/d6a9e222

Comment 20 Kamil Dudka 2019-07-26 16:58:08 UTC
dist-git commit:

https://src.fedoraproject.org/rpms/zsh/c/143732d6

Comment 21 Fedora Update System 2019-07-26 17:09:42 UTC
FEDORA-2019-949a7cdde2 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-949a7cdde2

Comment 22 Fedora Update System 2019-07-27 01:22:33 UTC
zsh-5.7.1-4.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-949a7cdde2

Comment 23 Fedora Update System 2019-08-04 01:13:37 UTC
zsh-5.7.1-4.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 rea.aft 2020-09-14 06:48:53 UTC
(In reply to Kamil Dudka from comment #15)
> Neither zsh upstream is able to reproduce the crash.  Do you use any zsh
> plug-ins or some special setup?

Yes, but the patch has solved this issue. Just repling to remove the needsinfo flag.

Comment 25 Kamil Dudka 2020-09-14 06:51:31 UTC
Perfect.  Thanks for feedback!


Note You need to log in before you can comment on or make changes to this bug.