zsh-workers
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Peter Stephenson <p.stephenson@samsung.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] Crash due to malloc call in signal handler
Date: Fri, 13 Dec 2019 10:45:21 +0100	[thread overview]
Message-ID: <CAN=4vMoW0QAe2ODVg-6aWxZwJSm+zpooBEU7J1YNxNNJ50nyGQ@mail.gmail.com> (raw)
In-Reply-To: <1576230001.5214.1.camel@samsung.com>

On Fri, Dec 13, 2019 at 10:40 AM Peter Stephenson
<p.stephenson@samsung.com> wrote:
> The main shell is suspended, waiting for a child to finish, so the fact
> it's in the signal handler isn't saying anything.
>
> From the look of it, some memory corruption must already have occurred
> at this point to get the malloc to fail.

malloc is not async signal safe. It's illegal to call it from a signal
handler. I'm not saying this is what's causing a crash.

Roman.

  reply	other threads:[~2019-12-13  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20191212182957epcas5p48645aa560e781ac1c34f00662a6d6176@epcas5p4.samsung.com>
2019-12-12 18:28 ` Antoine C.
2019-12-13  9:40   ` Peter Stephenson
2019-12-13  9:45     ` Roman Perepelitsa [this message]
2019-12-13 10:16       ` Peter Stephenson
2019-12-13 10:19         ` Roman Perepelitsa
2019-12-13 10:31           ` Peter Stephenson

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='CAN=4vMoW0QAe2ODVg-6aWxZwJSm+zpooBEU7J1YNxNNJ50nyGQ@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=p.stephenson@samsung.com \
    --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).