This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH MIPS] Work around Bash 4.2 bug
- From: Nick Clifton <nickc at redhat dot com>
- To: "Maciej W. Rozycki" <macro at imgtec dot com>
- Cc: Hans-Peter Nilsson <hp at bitrange dot com>, Ludovic Courtès <ludo at gnu dot org>, binutils at sourceware dot org, gcc at gcc dot gnu dot org
- Date: Tue, 4 Oct 2016 15:52:04 +0100
- Subject: Re: [PATCH MIPS] Work around Bash 4.2 bug
- Authentication-results: sourceware.org; auth=none
- References: <87d1jlrar1.fsf@gnu.org> <alpine.BSF.2.02.1609300615410.31642@arjuna.pair.com> <alpine.DEB.2.00.1610022006430.11928@tp.orcam.me.uk>
Hi Maciej,
>>> The patch below works around the Bash 4.2 bug described at
>>> <http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-007>.
>>
>>> * emulparams/elf32bmipn32-defs.sh: Shift quote of
>>> "x$EMULATION_NAME" to the left to work around
>>> <http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-007>.
>>>
>>
>>>
>>> -case x"$EMULATION_NAME" in
>>> +case "x$EMULATION_NAME" in
>>> xelf32*n32*) ELFSIZE=32 ;;
>>
>> Random comment from the sideline: pretty please add a comment
>> regarding the bug workaround *on top of the actual changed code*
>> (remember: the "why" goes in the code, not in the changelog), so
>> it has a better chance of not being inadvertently reverted but
>> instead propagating elsewhere.
>
> CC-ing <gcc@gcc.gnu.org> as this might affect them too.
>
> Hmm, the shell construct is so common that I think rather than auditing
> all the scripts throughout our tree I'd rather made a `configure' check
> for the buggy shell feature and reject any shell affected at the top level
> and across subdirectories. This way we won't have to keep an eye too for
> future script changes which might reintroduce the construct elsewhere.
>
> Nick, WDYT?
Hmm - well it has been 5 years since bug was fixed, but if we are receiving
error reports connected to it today then buggy versions must still be in use.
A quick grep shows that there are quite a few places in the gcc and binutils
configure scripts that use the problematic form, so I agree that fixing them
all, and stopping the problem from recurring in the future, would be hard to
do.
All in all, I think that your idea is the best way forwards, so yes, I would
support it.
Cheers
Nick