Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Probabilistic crash on zsh 5.9 on x86_64
- X-seq: zsh-workers 51637
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh bug report throwaway email thing <zsh.throwaway.eDjb3nwqw@xxxxxxxxx>
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: Probabilistic crash on zsh 5.9 on x86_64
- Date: Sat, 8 Apr 2023 23:36:27 +0200
- Archived-at: <https://zsh.org/workers/51637>
- In-reply-to: <tBWb5KtvEqjlaLFHtCcVrAmwPrj7aqaF50nYi_P69Xa6TiBh0ybu3JumnENwN5dGJJHi-unfO4E8igE27tXgSefdlNpUmOoAZ5fyBKSv2SU=@proton.me>
- List-id: <zsh-workers.zsh.org>
- References: <tBWb5KtvEqjlaLFHtCcVrAmwPrj7aqaF50nYi_P69Xa6TiBh0ybu3JumnENwN5dGJJHi-unfO4E8igE27tXgSefdlNpUmOoAZ5fyBKSv2SU=@proton.me>
On 4/8/23, zsh bug report throwaway email thing
<zsh.throwaway.eDjb3nwqw@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author