bug-bash
[Top][All Lists]
Advanced

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

Re: PATCH: make_var_array() mishandles exportstr on CYGWIN and SuSE


From: Chet Ramey
Subject: Re: PATCH: make_var_array() mishandles exportstr on CYGWIN and SuSE
Date: Mon, 20 Nov 2000 11:36:33 -0500

> Machine Type: i386-suse-linux
> 
> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
>       In the vanilla version this problem only arises on __CYGWIN__ and
>       __CYGWIN32__ platforms.  The Bash distributed with SuSE 7.0 contains a
>       patch that triggers this problem by enabling the __CYGWIN__ code in
>       this function.

Bad move by Andreas.  He doesn't make many.

>       During generation of 'export_env', function variables that have their
>       'exportstr' set, lose.  The problem is localized to the function
>       variables.c:make_var_array().

Thanks for the analysis, but it's slightly incorrect.  The exportstr member
of a struct variable is primarily used to cache variables in the shell's
initial environment, most of which the user doesn't change.  Using it to
cache exported functions is secondary.  That's why your `quick fix' wouldn't
work.

The proper fix is to simply call INVALIDATE_EXPORTSTR before any checks of
var->exportstr on cygwin systems.  The next release of bash will not have
the call to valid_exportstr().

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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