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

Re: another deadlock in free() called from a signal handler



On Wednesday, May 13, 2015 11:01:35 Bart Schaefer wrote:
> On May 13,  6:37pm, Kamil Dudka wrote:
> }
> } Wouldn't it be safer to wrap [z]free() internally by the signal
> } queuing macros?
> 
> Sigh.  I'm somewhat resistant to that because if the problem exists with
> free() then it probably also exists with other operations at the calling
> scope and the farther down we put defensive programming the less likely
> we are to get a reproducible bug report for the higher-level problem.

True.

> } A backtrace of the deadlock (captured with zsh-4.3.11-3.el6) follows:
> }
> } #10 0x000000000044a339 in lexrestore () at lex.c:342
> 
> The entire lexrestore() function is gone now, and its replacement has
> already got the signal queuing wrapped around it.  So I think the problem
> you're reporting here was already fixed:
> 
> commit 8727049674b1f39a8926c02dc74e9f19bbd70289
> Author: Barton E. Schaefer <schaefer@xxxxxxx>
> Date:   Tue Sep 30 20:34:58 2014 -0700
> 
>     33298: make lexrestore() more signal-safe

Thank you for pointing out the commit!  I will have a look if there is more
of them...

Kamil



Messages sorted by: Reverse Date, Date, Thread, Author