Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] malloc inside signal handler
- X-seq: zsh-workers 49223
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsugabubus <zsugabubus@national.shitposting.agency>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] malloc inside signal handler
- Date: Fri, 30 Jul 2021 18:33:08 -0700
- Archived-at: <https://zsh.org/workers/49223>
- In-reply-to: <20210724225048.ly7qpdvi55j3h5mi@localhost>
- List-id: <zsh-workers.zsh.org>
- References: <20210724225048.ly7qpdvi55j3h5mi@localhost>
On Sat, Jul 24, 2021 at 3:52 PM zsugabubus
<zsugabubus@national.shitposting.agency> wrote:
>
> It seems that setiparam("LINES"/"COLUMNS") inside adjustwinsize() wants
> allocate some memory for environment variables.
This statement is true, but has been true for decades; we go to some
lengths to make sure that signal handlers are not invoked during other
operations that perform malloc, so that there is no re-entry issue if
the signal handler needs to perform allocation. It's not possible to
run shell-code-based signal handlers without any means of dynamic
memory management.
Under what circumstances are you generating this error?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author