Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG] malloc inside signal handler



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