zsh-workers
 help / color / mirror / code / Atom feed
From: "Jun. T" <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: Probabilistic crash on zsh 5.9 on x86_64
Date: Fri, 14 Apr 2023 01:40:19 +0900	[thread overview]
Message-ID: <852F8278-39A7-4305-91C1-B9788352E061@kba.biglobe.ne.jp> (raw)
In-Reply-To: <2083513891.2014577.1681394631032@mail.virginmedia.com>


> 2023/04/13 23:03、Peter Stephenson <p.w.stephenson@ntlworld.com>のメール:
> 
> Have a look at this --- it simply marks the prog in the shell function as
> in use earlier and unmarks it later, so the shenanigans within to do
> with traps all come out in the wash.  So, in theory, there's not much
> to go wrong.  But let me know...

> +    marked_prog = shfunc->funcdef;
> +    useeprog(marked_prog);
(snip)
> +    freeeprog(marked_prog);

Even with this, shfunc is still freed, although shfunc->funcdef is not freed.
But doshfunc() continues to use shfunc, at lines 5854, 5954, 5957, etc.
If it doesn't crash, it means the freed memory is not yet used by others.
But I think this is unsafe, and valgrind gives lots of warnings.




  parent reply	other threads:[~2023-04-13 16:41 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
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 [this message]
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=852F8278-39A7-4305-91C1-B9788352E061@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /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).