zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsugabubus <zsugabubus@national.shitposting.agency>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] malloc inside signal handler
Date: Mon, 16 Aug 2021 21:20:19 -0700	[thread overview]
Message-ID: <CAH+w=7YevRsxGOV_USF0C6Krgxj=h9YB3TQmsMV55q6C1=UX5Q@mail.gmail.com> (raw)
In-Reply-To: <20210731202547.yxzvwevxvy22ywm3@localhost>

I just found this in my spam folder.

On Sat, Jul 31, 2021 at 1:25 PM zsugabubus
<zsugabubus@national.shitposting.agency> wrote:
>
> shingetline() calls winch_unblock() and dont_queue_signals() so fgetc()
> can be interrupted at any time.

Hm.  I'm not sure what we can do about this, except to stop using
stdio, because we have to be able to react to window size changes
while blocked waiting for input (that would be the most common time
for a window to be resized).  Maybe there's something sneaky we can do
with read_poll() so that we don't call fgetc() until it's guaranteed
to return something, and then we could hold signals again around the
actual fgetc() call.

Or maybe shingetline() doesn't actually need to call winch_unblock()
when loop(0,...) is called and isatty(bshin) is false ... which means
passing the value of toplevel down from loop().  But that probably
just fixes adjustwinsize() and leaves other signal handlers
unprotected.


  reply	other threads:[~2021-08-17  4:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24 22:50 zsugabubus
2021-07-31  1:33 ` Bart Schaefer
2021-07-31 20:25   ` zsugabubus
2021-08-17  4:20     ` Bart Schaefer [this message]
2021-08-17  8:21       ` Peter Stephenson
2021-08-18 19:27         ` Peter Stephenson
2021-08-26 15:46           ` Peter Stephenson
2021-08-26 15:51             ` Bart Schaefer

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='CAH+w=7YevRsxGOV_USF0C6Krgxj=h9YB3TQmsMV55q6C1=UX5Q@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    --cc=zsugabubus@national.shitposting.agency \
    /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).