zsh-workers
 help / color / mirror / code / Atom feed
* [BUG] Zsh crashes when using autocomplete because of memory unsafety (double free)
@ 2020-06-26 15:03 Petr Šťastný
  2020-06-26 16:24 ` Daniel Shahaf
  0 siblings, 1 reply; 10+ messages in thread
From: Petr Šťastný @ 2020-06-26 15:03 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 1156 bytes --]

Note: I'm using ohmyzsh to provide autocomplete and I can't reproduce it
without ohmyzsh, but since ohmyzsh is written entirely in shell, this
should be an issue in zsh itself.

When I trigger autocomplete in one position, zsh crashes, yielding one
of the following messages, seemingly at random:

(none, zsh crashes silently)         x12
double free or corruption (out)     x5

Zsh crashed each time I tried it.

zsh 5.8 (x86_64-pc-linux-gnu)
ohmyzsh, commit 6152ac30bede172ba0422a8610dc796948ae1546

Minimal setup:
$ alias a='""'
           ^

Place cursor so it stands on the first " character and press Tab to
trigger autocomplete. Zsh crashes.

I have almost default ohmyzsh installation, the only thing I changed is
theme (to `mrtazz`) and `git` plugin, none of which should affect this.
Zsh config itself (after being modified by ohmyzsh) is unchanged, if one
doesn't count `PATH` exports. Thus I don't see the need to attach my
full config. If anyone has troubles reproducing this, let me know. But
it should be enough to have ohmyzsh installed.

-- 
Petr Šťastný
FIT ČVUT

soptik.tech



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [BUG] Zsh crashes when using autocomplete because of memory unsafety (double free)
@ 2020-06-27 21:08 Petr Šťastný
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Šťastný @ 2020-06-27 21:08 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 589 bytes --]

Daniel Shahaf wrote on Fri, 26 Jun 2020 16:24:05 +0000:
> Petr, could you please check whether the issue reproduces if you
«unsetopt completeinword»?

I can confirm the issue is gone afterwards, nothing happens at all after
trying to autocomplete. I don't have any experience debugging this kind
of thing, so if there is anything I can do, please let me know.

Also, I'm sorry for late reply. I just discovered my selfhosted mail was
down for like a week so I didn't receive any mails. Yey. But I should
reply faster now.

-- 
Petr Šťastný
FIT ČVUT

soptik.tech



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-07-04 20:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26 15:03 [BUG] Zsh crashes when using autocomplete because of memory unsafety (double free) Petr Šťastný
2020-06-26 16:24 ` Daniel Shahaf
2020-06-26 16:32   ` Roman Perepelitsa
2020-06-26 17:17     ` zsh/lldb (was: Re: [BUG] Zsh crashes when using autocomplete because of memory unsafety (double free)) Daniel Shahaf
2020-06-28  7:09   ` [BUG] Zsh crashes when using autocomplete because of memory unsafety (double free) Bart Schaefer
2020-06-28 19:27     ` Bart Schaefer
2020-06-28 19:35       ` Bart Schaefer
2020-06-29  3:48         ` Bart Schaefer
2020-07-04 20:20           ` Bart Schaefer
2020-06-27 21:08 Petr Šťastný

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