Bug 684293 - ISO-8859-2 string with LC_ALL=*.utf-8 makes bash loop forever
Summary: ISO-8859-2 string with LC_ALL=*.utf-8 makes bash loop forever
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Roman Rakus
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-11 17:45 UTC by Michal Hlavinka
Modified: 2014-01-13 00:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-31 14:02:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Hlavinka 2011-03-11 17:45:38 UTC
Description of problem:
I was working on script for fixing broken non-utf8 file names (qt/kde can't handle them well), but found out that bash have some problems with iso-8859-2 strings when locale is set to utf-8

Version-Release number of selected component (if applicable):
bash-4.2.7-1.fc15.x86_64

How reproducible:
always

Steps to Reproduce:
1. echo foo | tr [$'\xFD'$'\xBA'] [$'\xFD'$'\xBE']
  
Actual results:
bash loops with 100 % CPU

Expected results:
foo


Additional info:
Tested with ksh and mksh shells and it works there. When you set LC_ALL=en_US.iso-8859-1 then it works in bash too:

LC_ALL=en_US.iso-8859-1; echo foo | tr [$'\xFD'$'\xBA'] [$'\xFD'$'\xBE']

prints "foo" as expected.

Comment 1 Roman Rakus 2011-03-14 09:00:31 UTC
Thanks for the report. The bug is in the bash globbing.
Easy reproducer:
[$'\xFD'$'\xBA']

Reported upstream.

Comment 2 Fedora Update System 2011-03-15 10:09:15 UTC
bash-4.2.7-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/bash-4.2.7-2.fc15

Comment 3 Fedora Update System 2011-03-31 13:58:03 UTC
bash-4.2.8-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/bash-4.2.8-2.fc15

Comment 4 Roman Rakus 2011-03-31 14:02:19 UTC
bash-4.2.8-2.fc15 reverts the previous change. It introduced another bugs (bug #689868). This bug will be fixed in future version, as announced upstream.


Note You need to log in before you can comment on or make changes to this bug.