bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] Malloc from signal handler in readline


From: Chet Ramey
Subject: Re: [Bug-readline] Malloc from signal handler in readline
Date: Thu, 02 Aug 2012 16:41:02 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

On 8/2/12 2:50 PM, Brian Bloniarz wrote:
> On 08/02/2012 08:49 AM, Chet Ramey wrote:
>> If you want to look at the fixed version, you can get it from the `devel'
>> branch of the bash git tree on savannah (the relevant file is
>> lib/readline/signals.c).
> 
> OK great, thanks for pointing me in the right direction. I don't quite
> know how to compile a standalone readline from here to test the fix,
> but I can at least read through the src.
> 
> Looking at the new sh_set_lines_and_columns, it avoids calling malloc
> but will use setenv (or putenv) to update an environment variable.

You're looking in the wrong place.  The change of note is in signals.c:
neither rl_signal_handler() nor rl_sigwinch_handler() will call
rl_resize_terminal() in a signal handler context; it is only called from
the RL_CHECK_SIGNALS() macro via _rl_signal_handler().

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]