[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-users] grep -F causes infinite loop
From: |
GOTO, Daisuke |
Subject: |
[Savannah-users] grep -F causes infinite loop |
Date: |
Thu, 25 Apr 2013 13:42:41 +0900 |
Hello, there,
grep -F causes infinite loop in a text which LOCALE differ.
(LOCALE is a ja_JP.UTF-8, and text is a SJIS)
It did not occur with an old version(GNU grep 2.6.1 or before).
Moreover, also when there is no LOCALE, it does not occur.
It is reproducible in the following environments:
# uname -a
Linux myServer 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release
CentOS release 6.3 (Final)
# grep -V
GNU grep 2.6.3
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
# locale
LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=
# printf '\202\240\202\240' | grep -F $'\202\240'
(infinite loop...)
Regards,
--
GOTO, Daisuke <address@hidden>
Kawasaki, Kanagawa, JAPAN
- [Savannah-users] grep -F causes infinite loop,
GOTO, Daisuke <=