bash evaluation change...

Roman Rakus rrakus at redhat.com
Mon Mar 7 12:38:21 UTC 2011


On 03/03/2011 09:03 PM, Nathanael D. Noblet wrote:
> On 03/03/2011 12:42 PM, Will Woods wrote:
>> On Wed, 2011-03-02 at 22:55 -0800, Toshio Kuratomi wrote:
Hi guys.
>>> I'd say, report this as a bug and see where it leads.  It's certainly not
>>> expected behaviour even if it is intentional.
Already reported.
>> One-line reproducer:
>>
>> case x"" in x) echo matches x;; x?) echo matches x? but not x;; esac
>>
>> I notice the bash-4.2 CHANGES file[1] mentions something like this in
>> the changes from alpha to beta:
>>
>> "b.  Fixed a bug that caused partially-quoted words that were not
>> subject to word splitting to retained quoted NULLs."
>>
>> Maybe that's not as fixed as they thought?
> Yeah, got the following from the bash-bug list that Roman submitted.
> Here's a fix.  This is very similar to bash42-004.
>
> Chet
>
> *** ../bash-4.2-patched/subst.c	2011-02-25 12:03:58.000000000 -0500
> --- subst.c	2011-03-03 14:08:23.000000000 -0500
> ***************
> *** 4609,4614 ****
> --- 4611,4617 ----
>       if (ifs_firstc == 0)
>     #endif
>         word->flags |= W_NOSPLIT;
> +   word->flags |= W_NOSPLIT2;
>       result = call_expand_word_internal (word, quoted, 0, (int *)NULL,
> (int *)NULL);
>       expand_no_split_dollar_star = 0;
>
> So I presume it'll make its way into a newer bash eventually?? Not sure
> on the process but it looks like the powers that be recognize and have a
> fix for it.
Yep, this patch is from upstream. I will apply it soon. You can track 
the issue in bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=681940

RR


More information about the devel mailing list