zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh bug report throwaway email thing <zsh.throwaway.eDjb3nwqw@proton.me>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Probabilistic crash on zsh 5.9 on x86_64
Date: Sat, 8 Apr 2023 23:36:27 +0200	[thread overview]
Message-ID: <CAHYJk3QaY_ejw2gCw5d1BzyvB4W3EyU7cb1TWtZpRhx=QSpw+w@mail.gmail.com> (raw)
In-Reply-To: <tBWb5KtvEqjlaLFHtCcVrAmwPrj7aqaF50nYi_P69Xa6TiBh0ybu3JumnENwN5dGJJHi-unfO4E8igE27tXgSefdlNpUmOoAZ5fyBKSv2SU=@proton.me>

On 4/8/23, zsh bug report throwaway email thing
<zsh.throwaway.eDjb3nwqw@proton.me> wrote:
> Hello,
>
> I would like to report a bug in zsh 5.9 (x86_64-pc-linux-gnu) (on Arch
> Linux, but I also reproduced on Alpine in QEMU, so it is probably zsh and
> not libc. Also, this does not happen in archiso in qemu, which is also
> weird.).
>
> Repro instructions: run the commands:
> TRAPEXIT() { ls }
> TRAPEXIT
> # if that does not crash, keep typing TRAPEXIT until it does. sometimes it
> doesn't crash.
>
> Expected behavior: zsh might throw an error or something? but it shouldn't
> crash
> Actual behavior: there is an unknown chance that zsh throws an error and
> crashes like this:
> zsh: TRAPEXIT: function not defined by file
> malloc(): unaligned tcache chunk detected
> [1] 34511 IOT instruction (core dumped) zsh
>
> Nothing relevant in dmesg.
>
> If I can help in any way, please contact me.
>
> Kind regards,
> an anonymous bug reporter

It seems to happen reliably for me every time, with these messages,
% MALLOC_CHECK_=3 zsh -fc 'TRAPEXIT() { ls }; TRAPEXIT'
1: parse.c:2817: Heap EPROG has nref > 0
free(): invalid pointer
zsh: abort      MALLOC_CHECK_=3 zsh -fc 'TRAPEXIT() { ls }; TRAPEXIT'

valgrind is also extremely unhappy with this execution path.

-- 
Mikael Magnusson


  reply	other threads:[~2023-04-08 21:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-08 17:28 zsh bug report throwaway email thing
2023-04-08 21:36 ` Mikael Magnusson [this message]
2023-04-11 16:14   ` Jun. T
2023-04-11 16:29     ` Peter Stephenson
2023-04-13 10:47       ` Peter Stephenson
2023-04-13 11:12         ` Peter Stephenson
2023-04-13 13:02           ` Jun. T
2023-04-13 13:19             ` Peter Stephenson
2023-04-13 14:03               ` Peter Stephenson
2023-04-13 14:13                 ` Peter Stephenson
2023-04-13 16:40                 ` Jun. T
2023-04-13 16:55                   ` Peter Stephenson
2023-04-14  8:29                     ` Peter Stephenson
2023-04-14 12:21                       ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHYJk3QaY_ejw2gCw5d1BzyvB4W3EyU7cb1TWtZpRhx=QSpw+w@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    --cc=zsh.throwaway.eDjb3nwqw@proton.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).