On 3/1/11 10:13 AM, Allan McRae wrote:
> On 01/03/11 11:58, Chet Ramey wrote:
>>             BASH PATCH REPORT
>>                  =================
>>
>> Bash-Release:    4.2
>> Patch-ID:    bash42-005
>>
>> Bug-Reported-by:    Dennis Williamson<dennistwilliam...@gmail.com>
>> Bug-Reference-ID:   
>> <aanlktikdbev5rnbpc0zofmzfbcg0xgetzllzk+kjr...@mail.gmail.com>
>> Bug-Reference-URL:   
>> http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00147.html
>>
>> Bug-Description:
>>
>> Systems that use tzset() to set the local timezone require the TZ variable
>> to be in the environment.  Bash must make sure the environment has been
>> modified with any updated value for TZ before calling tzset().  This
>> affects prompt string expansions and the `%T' printf conversion
>> specification
>> on systems that do not allow bash to supply a replacement for getenv(3).
>>
>> Patch (apply with `patch -p0'):
> 
> 
> This patch just caused some havoc for Arch Linux testing repository users
> who found their systems no longer booted...
> 
> Here is one our users findings on the issue:
> 
> On 01/03/11 23:57, Evangelos Foutras wrote:
>> `unset TZ' is the simplest test case that causes a segmentation fault
>> on my system.
>>
>> The culprit appears to be the chkexport function introduced in patch
>> bash42-005 [1]. From the backtrace [2], I gather it should probably
>> check that find_variable returns a non-NULL value. Changing the line
>> after the find_variable call to read "if (v&&  exported_p (v))" fixes
>> the issue for me.

Here's a quick patch.  Give it a workout.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.2-patched/variables.c     2011-02-25 12:07:41.000000000 -0500
--- variables.c 2011-03-01 10:13:04.000000000 -0500
***************
*** 3661,3665 ****
  
    v = find_variable (name);
!   if (exported_p (v))
      {
        array_needs_making = 1;
--- 3661,3665 ----
  
    v = find_variable (name);
!   if (v && exported_p (v))
      {
        array_needs_making = 1;

Reply via email to