From unknown Wed Jun 18 23:17:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#38223 <38223@debbugs.gnu.org> To: bug#38223 <38223@debbugs.gnu.org> Subject: Status: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp Reply-To: bug#38223 <38223@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:17:46 +0000 retitle 38223 grep >=3D2.28 cannot handle -wF correctly under LANG=3Dja_JP.= eucjp reassign 38223 grep submitter 38223 "NIDE, Naoyuki" severity 38223 normal tag 38223 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 15 14:53:08 2019 Received: (at submit) by debbugs.gnu.org; 15 Nov 2019 19:53:08 +0000 Received: from localhost ([127.0.0.1]:37414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVheV-0005wF-Gf for submit@debbugs.gnu.org; Fri, 15 Nov 2019 14:53:08 -0500 Received: from lists.gnu.org ([209.51.188.17]:51153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVgwA-0004oc-PC for submit@debbugs.gnu.org; Fri, 15 Nov 2019 14:07:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52176) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVgw9-00030f-FK for bug-grep@gnu.org; Fri, 15 Nov 2019 14:07:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVgw7-0007jz-SW for bug-grep@gnu.org; Fri, 15 Nov 2019 14:07:17 -0500 Received: from shannon.ics.nara-wu.ac.jp ([160.11.70.11]:47546) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iVgw7-0007ZT-IS for bug-grep@gnu.org; Fri, 15 Nov 2019 14:07:15 -0500 Received: from azusa.ics.nara-wu.ac.jp ([160.11.72.218]) by shannon.ics.nara-wu.ac.jp with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1iVgvk-0008GL-RB (envelope-from ) for bug-grep@gnu.org; Sat, 16 Nov 2019 04:06:52 +0900 Received: from user-182242086061.kinet-tv.ne.jp ([61.86.242.182] helo=yamane.local.nara-wu.ac.jp) by azusa.ics.nara-wu.ac.jp with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iVgvk-000328-JH for bug-grep@gnu.org; Sat, 16 Nov 2019 04:06:52 +0900 Received: from localhost ([127.0.0.1]) by yamane.local.nara-wu.ac.jp with esmtp (Exim 4.92) (envelope-from ) id 1iVgvk-0003An-72 for bug-grep@gnu.org; Sat, 16 Nov 2019 04:06:52 +0900 Date: Sat, 16 Nov 2019 04:06:51 +0900 (JST) Message-Id: <20191116.040651.08427536.nide@yamane.local.nara-wu.ac.jp> To: bug-grep@gnu.org Subject: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp From: "NIDE, Naoyuki" X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 160.11.70.11 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 15 Nov 2019 14:53:05 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) echo ba | LANG=ja_JP.eucjp grep -F -w a outputs ba, but should output nothing. NIDE, Naoyuki nide@ics.nara-wu.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 15 16:38:50 2019 Received: (at 38223) by debbugs.gnu.org; 15 Nov 2019 21:38:50 +0000 Received: from localhost ([127.0.0.1]:37473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVjIn-0001z4-L2 for submit@debbugs.gnu.org; Fri, 15 Nov 2019 16:38:49 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVjIk-0001yp-2Y for 38223@debbugs.gnu.org; Fri, 15 Nov 2019 16:38:48 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9C9E116023F; Fri, 15 Nov 2019 13:38:39 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id MuOa7PSFXL2L; Fri, 15 Nov 2019 13:38:39 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id EC63D160613; Fri, 15 Nov 2019 13:38:38 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id d4AX_njquYDi; Fri, 15 Nov 2019 13:38:38 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C76AE16023F; Fri, 15 Nov 2019 13:38:38 -0800 (PST) Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp To: "NIDE, Naoyuki" References: <20191116.040651.08427536.nide@yamane.local.nara-wu.ac.jp> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Fri, 15 Nov 2019 13:38:38 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191116.040651.08427536.nide@yamane.local.nara-wu.ac.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38223 Cc: 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 11/15/19 11:06 AM, NIDE, Naoyuki wrote: > echo ba | LANG=ja_JP.eucjp grep -F -w a > outputs ba, but should output nothing. I don't observe this problem with GNU grep 3.3 on Fedora 31. Please try upgrading to grep 3.3, the current release. If that doesn't work, please send more details about your configuration: what OS you're using, how you built 'grep', etc. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 15 16:39:16 2019 Received: (at control) by debbugs.gnu.org; 15 Nov 2019 21:39:16 +0000 Received: from localhost ([127.0.0.1]:37477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVjJC-000204-1A for submit@debbugs.gnu.org; Fri, 15 Nov 2019 16:39:16 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVjJA-0001zs-GN for control@debbugs.gnu.org; Fri, 15 Nov 2019 16:39:12 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 20F6D16023F for ; Fri, 15 Nov 2019 13:39:07 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id kNh4p3zmguEG for ; Fri, 15 Nov 2019 13:39:06 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 829C5160613 for ; Fri, 15 Nov 2019 13:39:06 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id B8nn2qnJXBPe for ; Fri, 15 Nov 2019 13:39:06 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 6381E16023F for ; Fri, 15 Nov 2019 13:39:06 -0800 (PST) To: control@debbugs.gnu.org From: Paul Eggert Subject: 38223 needs more info Organization: UCLA Computer Science Department Message-ID: <5849ab71-346a-1573-3297-1b96c1a64fa4@cs.ucla.edu> Date: Fri, 15 Nov 2019 13:39:06 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 38223 + moreinfo From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 15 19:30:17 2019 Received: (at submit) by debbugs.gnu.org; 16 Nov 2019 00:30:17 +0000 Received: from localhost ([127.0.0.1]:37509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVlyj-0007xV-Bl for submit@debbugs.gnu.org; Fri, 15 Nov 2019 19:30:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:33178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVlyh-0007xK-9Q for submit@debbugs.gnu.org; Fri, 15 Nov 2019 19:30:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41366) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVlyg-0004Os-3M for bug-grep@gnu.org; Fri, 15 Nov 2019 19:30:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_50,FREEMAIL_FROM, KHOP_HELO_FCRDNS,RDNS_DYNAMIC autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVlye-0000bg-QT for bug-grep@gnu.org; Fri, 15 Nov 2019 19:30:13 -0500 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:48652 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iVlye-0000VE-JZ for bug-grep@gnu.org; Fri, 15 Nov 2019 19:30:12 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1iVlyZ-000vJP-Ol for bug-grep@gnu.org; Sat, 16 Nov 2019 01:30:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-grep@gnu.org From: Stephane Chazelas Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp Date: Sat, 16 Nov 2019 00:27:25 +0000 Message-ID: <20191116002725.gcyeu5ces35xaupz@chaz.gmail.com> References: <20191116.040651.08427536.nide@yamane.local.nara-wu.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: NeoMutt/20171215 Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) 2019-11-15 13:38:38 -0800, Paul Eggert: > On 11/15/19 11:06 AM, NIDE, Naoyuki wrote: > > echo ba | LANG=ja_JP.eucjp grep -F -w a > > outputs ba, but should output nothing. > > I don't observe this problem with GNU grep 3.3 on Fedora 31. Please try > upgrading to grep 3.3, the current release. If that doesn't work, please > send more details about your configuration: what OS you're using, how you > built 'grep', etc. Thanks. [...] I can reproduce on Linux Mint 19.2 Tina amd64, based on Ubuntu 18.04 with grep 3.1 and 3.3 and glibc 2.27-3ubuntu1. $ echo ba | LC_ALL=ja_JP.eucjp ./src/grep -o '[[:alnum:]]' b a $ echo \\nba\\n | LC_ALL=ja_JP.eucjp ./src/grep -wF a ba Also in these locales: ja_JP.eucjp ko_KR.euckr zh_CN.gb18030 zh_CN.gb2312 zh_CN.gbk zh_HK.big5hkscs zh_SG.gb2312 zh_SG.gbk zh_TW.big5 zh_TW.euctw -- Stephane From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 16 01:15:33 2019 Received: (at 38223) by debbugs.gnu.org; 16 Nov 2019 06:15:33 +0000 Received: from localhost ([127.0.0.1]:37627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVrMn-0001L8-4V for submit@debbugs.gnu.org; Sat, 16 Nov 2019 01:15:32 -0500 Received: from shannon.ics.nara-wu.ac.jp ([160.11.70.11]:51612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVqNI-0006CU-2y for 38223@debbugs.gnu.org; Sat, 16 Nov 2019 00:11:58 -0500 Received: from azusa.ics.nara-wu.ac.jp ([160.11.72.218]) by shannon.ics.nara-wu.ac.jp with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1iVqN7-0000vz-8p (envelope-from ); Sat, 16 Nov 2019 14:11:45 +0900 Received: from user-182242086061.kinet-tv.ne.jp ([61.86.242.182] helo=yamane.local.nara-wu.ac.jp) by azusa.ics.nara-wu.ac.jp with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iVqN7-0005RF-0o; Sat, 16 Nov 2019 14:11:45 +0900 Received: from [127.0.0.1] (helo=localhost) by yamane.local.nara-wu.ac.jp with esmtp (Exim 4.92) (envelope-from ) id 1iVqN6-0006Z7-Ei; Sat, 16 Nov 2019 14:11:44 +0900 Date: Sat, 16 Nov 2019 14:11:44 +0900 (JST) Message-Id: <20191116.141144.450391992.nide@yamane.local.nara-wu.ac.jp> To: eggert@cs.ucla.edu Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp From: "NIDE, Naoyuki" In-Reply-To: References: <20191116.040651.08427536.nide@yamane.local.nara-wu.ac.jp> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38223 X-Mailman-Approved-At: Sat, 16 Nov 2019 01:15:27 -0500 Cc: nide@ics.nara-wu.ac.jp, 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) In Message , Paul Eggert writes: > On 11/15/19 11:06 AM, NIDE, Naoyuki wrote: > > echo ba | LANG=ja_JP.eucjp grep -F -w a > > outputs ba, but should output nothing. > > I don't observe this problem with GNU grep 3.3 on Fedora 31. Please > try upgrading to grep 3.3, the current release. If that doesn't work, > please send more details about your configuration: what OS you're > using, how you built 'grep', etc. Thanks. I am using grep 3.3 on Debian buster (the packaged one by Debian). $ uname -a Linux myhost 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux $ cat /etc/debian_version 10.1 $ which grep /bin/grep $ grep --version grep (GNU grep) 3.3 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and others; see . $ echo ba | LANG=ja_JP.eucjp grep -F -w a ba The bug appears. Perhaps you tried on an environment which does not have ja_JP.eucjp locale? I also tried grep 3.3 built from the source (on the same environment). $ wget http://ftp.jaist.ac.jp/pub/GNU/grep/grep-3.3.tar.xz $ tar zxf grep-3.3.tar.xz $ cd grep-3.3 $ ./configure --prefix=/tmp/test checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for gawk... (cached) gawk checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether make supports the include directive... yes (GNU style) checking dependency style of gcc... gcc3 checking for sys/types.h... yes checking for sys/stat.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for ucontext.h... yes checking for sys/param.h... yes checking for sys/socket.h... yes checking for dirent.h... yes checking for fnmatch.h... yes checking for wctype.h... yes checking for stdio_ext.h... yes checking for sys/vfs.h... yes checking for getopt.h... yes checking for sys/cdefs.h... yes checking for iconv.h... yes checking for limits.h... yes checking for wchar.h... yes checking for crtdefs.h... no checking for langinfo.h... yes checking for xlocale.h... no checking for sys/mman.h... yes checking for malloc.h... yes checking for sys/time.h... yes checking for features.h... yes checking for arpa/inet.h... yes checking for netdb.h... yes checking for netinet/in.h... yes checking for sys/select.h... yes checking for sys/wait.h... yes checking for sys/ioctl.h... yes checking for sys/uio.h... yes checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking whether _XOPEN_SOURCE should be defined... no checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... fn_grep checking for egrep... (cached) fn_grep checking for Minix Amsterdam compiler... no checking for ar... ar checking for ranlib... ranlib checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for ranlib... (cached) ranlib checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for size_t... yes checking for an ANSI C-conforming const... yes checking for working alloca.h... yes checking for alloca... yes checking whether uses 'inline' correctly... yes checking for btowc... yes checking for setrlimit... yes checking for sigaltstack... yes checking for _set_invalid_parameter_handler... no checking for fchdir... yes checking for strerror_r... yes checking for fcntl... yes checking for symlink... yes checking for fdopendir... yes checking for mempcpy... yes checking for fnmatch... yes checking for isblank... yes checking for iswctype... yes checking for mbsrtowcs... yes checking for wmemchr... yes checking for wmemcpy... yes checking for wmempcpy... yes checking for fstatat... yes checking for openat... yes checking for fstatfs... yes checking for getdtablesize... yes checking for getprogname... no checking for getexecname... no checking for iswcntrl... yes checking for iswblank... yes checking for lstat... yes checking for mbsinit... yes checking for mbrtowc... yes checking for mbrlen... yes checking for mbslen... no checking for mprotect... yes checking for nl_langinfo... yes checking for sigaction... yes checking for siginterrupt... yes checking for strdup... yes checking for __xpg_strerror_r... yes checking for strtoimax... yes checking for strtoumax... yes checking for pipe... yes checking for wcrtomb... yes checking for wctob... yes checking for wcwidth... yes checking for ftruncate... yes checking for gettimeofday... yes checking for newlocale... yes checking for uselocale... yes checking for duplocale... yes checking for freelocale... yes checking for setenv... yes checking for sleep... yes checking for snprintf... yes checking for catgets... yes checking for shutdown... yes checking for vasnprintf... no checking for isascii... yes checking for setlocale... yes checking for nl_langinfo and CODESET... yes checking for a traditional french locale... none checking for working C stack overflow detection... yes checking for correct stack_t interpretation... yes checking for precise C stack overflow detection... no checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking 32-bit host C ABI... no checking for the common suffixes of directories in the library search path... lib,lib checking for libsigsegv... no, consider installing GNU libsigsegv checking how gcc reports undeclared, standard C functions... error checking whether the preprocessor supports include_next... yes checking whether system header files limit the line length... no checking whether // is distinct from /... no checking for complete errno.h... yes checking whether strerror_r is declared... yes checking whether strerror_r returns char *... yes checking whether fchdir is declared... yes checking for working fcntl.h... yes checking for pid_t... yes checking for mode_t... yes checking for promoted mode_t type... mode_t checking for mbstate_t... yes checking whether stat file-mode macros are broken... no checking for nlink_t... yes checking whether lstat correctly handles trailing slash... yes checking for O_CLOEXEC... yes checking whether getcwd (NULL, 0) allocates memory for result... yes checking for getcwd with POSIX signature... yes checking whether getdtablesize is declared... yes checking for getopt.h... (cached) yes checking for getopt_long_only... yes checking whether getopt is POSIX compatible... yes checking for working GNU getopt function... yes checking for working GNU getopt_long function... yes checking for iconv... yes checking for working iconv... yes checking for iconv declaration... extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); checking for inline... inline checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... yes checking for wint_t... yes checking whether wint_t is too small... no checking for unsigned long long int... yes checking for long long int... yes checking whether stdint.h conforms to C99... yes checking whether stdint.h predates C++11... no checking whether stdint.h has UINTMAX_WIDTH etc.... yes checking for inttypes.h... (cached) yes checking whether the inttypes.h PRIxNN macros are broken... no checking whether iswcntrl works... yes checking for towlower... yes checking for wctype_t... yes checking for wctrans_t... yes checking for wchar_t... yes checking for good max_align_t... yes checking whether NULL can be used in arbitrary expressions... yes checking whether imported symbols can be declared weak... yes checking whether the linker supports --as-needed... yes checking whether the linker supports --push-state... yes checking for pthread.h... yes checking for multithread API to use... posix checking for a sed that does not truncate output... /bin/sed checking whether malloc, realloc, calloc are POSIX compliant... yes checking for stdlib.h... yes checking for GNU libc compatible malloc... yes checking for a traditional japanese locale... ja_JP checking for a transitional chinese locale... none checking for a french Unicode locale... none checking whether mbrtowc handles incomplete characters... yes checking whether mbrtowc works as well as mbtowc... guessing yes checking whether mbrtowc handles a NULL pwc argument... guessing yes checking whether mbrtowc handles a NULL string argument... guessing yes checking whether mbrtowc has a correct return value... yes checking whether mbrtowc returns 0 when parsing a NUL character... guessing yes checking whether mbrtowc works on empty input... (cached) assume yes checking whether the C locale is free of encoding errors... no checking for mmap... yes checking for MAP_ANONYMOUS... yes checking whether memchr works... yes checking for C/C++ restrict keyword... __restrict checking whether memrchr is declared... yes checking whether defines MIN and MAX... no checking whether defines MIN and MAX... yes checking for sigset_t... yes checking whether alarm is declared... yes checking whether we are using the GNU C Library >= 2.1 or uClibc... yes checking for ssize_t... yes checking for uid_t in sys/types.h... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking whether strdup is declared... yes checking whether strerror(0) succeeds... yes checking for strerror_r with POSIX signature... no checking whether __xpg_strerror_r works... yes checking whether strnlen is declared... yes checking whether strstr works... no checking whether strtoimax is declared... yes checking whether strtoumax is declared... yes checking for struct timespec in ... yes checking whether clearerr_unlocked is declared... yes checking whether feof_unlocked is declared... yes checking whether ferror_unlocked is declared... yes checking whether fflush_unlocked is declared... yes checking whether fgets_unlocked is declared... yes checking whether fputc_unlocked is declared... yes checking whether fputs_unlocked is declared... yes checking whether fread_unlocked is declared... yes checking whether fwrite_unlocked is declared... yes checking whether getc_unlocked is declared... yes checking whether getchar_unlocked is declared... yes checking whether putc_unlocked is declared... yes checking whether putchar_unlocked is declared... yes checking whether is self-contained... yes checking for shutdown... (cached) yes checking whether defines the SHUT_* macros... yes checking for struct sockaddr_storage... yes checking for sa_family_t... yes checking for struct sockaddr_storage.ss_family... yes checking if environ is properly declared... yes checking for struct timeval... yes checking for wide-enough struct timeval.tv_sec member... yes checking for IPv4 sockets... yes checking for IPv6 sockets... yes checking for off_t... yes checking for LC_MESSAGES... yes checking whether uselocale works... yes checking for fake locale system (OpenBSD)... no checking for Solaris 11.4 locale system... no checking for getlocalename_l... no checking for CFPreferencesCopyAppValue... no checking for CFLocaleCopyCurrent... no checking for CFLocaleCopyPreferredLanguages... no checking whether is self-contained... yes checking for library containing setsockopt... none needed checking whether select supports a 0 argument... yes checking whether select detects invalid fds... yes checking whether setenv is declared... yes checking for search.h... yes checking for tsearch... yes checking whether snprintf returns a byte count as in C99... yes checking whether snprintf is declared... yes checking whether unsetenv is declared... yes checking for inttypes.h... yes checking for stdint.h... yes checking for intmax_t... yes checking where to find the exponent in a 'double'... word 1 bit 20 checking for snprintf... (cached) yes checking for strnlen... yes checking for wcslen... yes checking for wcsnlen... yes checking for mbrtowc... (cached) yes checking for wcrtomb... (cached) yes checking whether _snprintf is declared... no checking for alloca as a compiler built-in... yes checking whether to enable assertions... yes checking whether btowc(0) is correct... yes checking whether btowc(EOF) is correct... guessing yes checking for __builtin_expect... yes checking whether sigaltstack is declared... yes checking for stack_t... yes checking whether this system has an arbitrary file name length limit... yes checking for closedir... yes checking for d_ino member in directory struct... yes checking for d_type member in directory struct... yes checking for dirfd... yes checking whether dirfd is declared... yes checking whether dirfd is a macro... no checking whether // is distinct from /... (cached) no checking whether dup works... yes checking whether dup2 works... yes checking for error_at_line... yes checking whether fcntl handles F_DUPFD correctly... yes checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check checking whether fdopendir is declared... yes checking whether fdopendir works... yes checking for flexible array member... yes checking for working POSIX fnmatch... yes checking for __fpending... yes checking whether __fpending is declared... yes checking whether fstatat (..., 0) works... yes checking for struct statfs.f_type... yes checking for __fsword_t... yes checking whether getdtablesize works... yes checking for getpagesize... yes checking whether getpagesize is declared... yes checking whether program_invocation_name is declared... yes checking whether program_invocation_short_name is declared... yes checking whether __argv is declared... no checking whether the compiler generally respects inline... yes checking whether INT32_MAX < INTMAX_MAX... yes checking whether INT64_MAX == LONG_MAX... yes checking whether UINT32_MAX < UINTMAX_MAX... yes checking whether UINT64_MAX == ULONG_MAX... yes checking whether iswblank is declared... yes checking whether langinfo.h defines CODESET... yes checking whether langinfo.h defines T_FMT_AMPM... yes checking whether langinfo.h defines ALTMON_1... yes checking whether langinfo.h defines ERA... yes checking whether langinfo.h defines YESEXPR... yes checking whether the compiler supports the __inline keyword... yes checking for libsigsegv... (cached) no, consider installing GNU libsigsegv checking whether locale.h conforms to POSIX:2001... yes checking whether struct lconv is properly defined... yes checking for pthread_rwlock_t... yes checking whether pthread_rwlock_rdlock prefers a writer to a reader... no checking whether lseek detects pipes... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... (cached) yes checking whether mbrtowc handles incomplete characters... (cached) yes checking whether mbrtowc works as well as mbtowc... (cached) guessing yes checking whether mbrtowc handles a NULL pwc argument... (cached) guessing yes checking whether mbrtowc handles a NULL string argument... (cached) guessing yes checking whether mbrtowc has a correct return value... (cached) yes checking whether mbrtowc returns 0 when parsing a NUL character... (cached) guessing yes checking whether mbrtowc works on empty input... (cached) assume yes checking whether the C locale is free of encoding errors... (cached) no checking whether mbrtowc handles incomplete characters... (cached) yes checking whether mbrtowc works as well as mbtowc... (cached) guessing yes checking whether mbrtowc handles incomplete characters... (cached) yes checking whether mbrtowc works as well as mbtowc... (cached) guessing yes checking whether mbsrtowcs works... yes checking for mempcpy... (cached) yes checking for memrchr... yes checking whether YESEXPR works... yes checking for obstacks that work with any size object... no checking whether open recognizes a trailing slash... yes checking for opendir... yes checking for perl5.005 or newer... yes checking for raise... yes checking for sigprocmask... yes checking for readdir... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... yes checking for working re_compile_pattern... no checking for libintl.h... yes checking whether isblank is declared... yes checking for struct sigaction.sa_sigaction... yes checking for volatile sig_atomic_t... yes checking for sighandler_t... yes checking for sigprocmask... (cached) yes checking for ssize_t... (cached) yes checking whether stat handles trailing slashes on files... yes checking for struct stat.st_atim.tv_nsec... yes checking whether struct stat.st_atim is of type struct timespec... yes checking for struct stat.st_birthtimespec.tv_nsec... no checking for struct stat.st_birthtimensec... no checking for struct stat.st_birthtim.tv_nsec... no checking for working stdalign.h... yes checking for va_copy... yes checking for good max_align_t... (cached) yes checking whether NULL can be used in arbitrary expressions... (cached) yes checking which flavor of printf attribute matches inttypes macros... system checking for stpcpy... yes checking for working strerror function... yes checking for working strnlen... yes checking whether strstr works... (cached) no checking whether strtoimax works... yes checking for strtoll... yes checking for strtoull... yes checking for nlink_t... (cached) yes checking whether mbrtowc handles incomplete characters... (cached) yes checking whether mbrtowc works as well as mbtowc... (cached) guessing yes checking whether wcrtomb return value is correct... yes checking whether wctob works... guessing yes checking whether wctob is declared... yes checking whether iswcntrl works... (cached) yes checking for towlower... (cached) yes checking for wctype_t... (cached) yes checking for wctrans_t... (cached) yes checking whether wcwidth is declared... yes checking whether wcwidth works reasonably in UTF-8 locales... yes checking for a traditional french locale... (cached) none checking for a french Unicode locale... (cached) none checking for a traditional french locale... (cached) none checking for a turkish Unicode locale... none checking whether fdopen sets errno... yes checking whether conversion from 'int' to 'long double' works... yes checking whether gettimeofday clobbers localtime buffer... no checking for gettimeofday with POSIX signature... almost checking for library containing inet_pton... none required checking whether inet_pton is declared... yes checking whether byte ordering is bigendian... no checking for ioctl... yes checking for ioctl with POSIX signature... no checking for setlocale... (cached) yes checking for a turkish Unicode locale... (cached) none checking for a french Unicode locale... (cached) none checking for a traditional french locale... (cached) none checking for a french Unicode locale... (cached) none checking for a traditional japanese locale... (cached) ja_JP checking for a transitional chinese locale... (cached) none checking for a french Unicode locale... (cached) none checking for a transitional chinese locale... (cached) none checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking for library containing nanosleep... none required checking for working nanosleep... no (mishandles large arguments) checking whether is self-contained... yes checking for a traditional french locale... (cached) none checking for a french Unicode locale... (cached) none checking whether perror matches strerror... yes checking for putenv compatible with GNU and SVID... yes checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking whether select supports a 0 argument... (cached) yes checking whether select detects invalid fds... (cached) yes checking whether setenv validates arguments... yes checking for a traditional french locale... (cached) none checking for a french Unicode locale... (cached) none checking for a traditional japanese locale... (cached) ja_JP checking for a transitional chinese locale... (cached) none checking for stdint.h... (cached) yes checking for SIZE_MAX... yes checking whether sleep is declared... yes checking for working sleep... yes checking for snprintf... (cached) yes checking whether snprintf respects a size of 1... yes checking whether printf supports POSIX/XSI format strings with positions... yes checking for socklen_t... yes checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking whether symlink handles trailing slash correctly... yes checking whether declares ioctl... yes checking for unsetenv... yes checking for unsetenv() return type... int checking whether unsetenv obeys POSIX... yes checking for ptrdiff_t... yes checking for a traditional french locale... (cached) none checking for a french Unicode locale... (cached) none checking for a traditional japanese locale... (cached) ja_JP checking for a transitional chinese locale... (cached) none checking for stdint.h... (cached) yes checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking whether closedir returns void... no checking whether NLS is requested... yes checking for msgfmt... /usr/bin/msgfmt checking for gmsgfmt... /usr/bin/msgfmt checking for xgettext... /usr/bin/xgettext checking for msgmerge... /usr/bin/msgmerge checking for CFPreferencesCopyAppValue... (cached) no checking for CFLocaleCopyCurrent... (cached) no checking for CFLocaleCopyPreferredLanguages... (cached) no checking for GNU gettext in libc... yes checking whether to use NLS... yes checking where the gettext function comes from... libc checking for PCRE... yes checking for pcre_compile... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating lib/Makefile config.status: creating src/Makefile config.status: creating tests/Makefile config.status: creating po/Makefile.in config.status: creating doc/Makefile config.status: creating gnulib-tests/Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing po-directories commands config.status: creating po/POTFILES config.status: creating po/Makefile $ make make all-recursive make[1]: Entering directory '/tmp/grep-3.3' Making all in po make[2]: Entering directory '/tmp/grep-3.3/po' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/tmp/grep-3.3/po' Making all in lib make[2]: Entering directory '/tmp/grep-3.3/lib' GEN alloca.h GEN configmake.h GEN ctype.h GEN dirent.h GEN fcntl.h GEN iconv.h GEN inttypes.h GEN langinfo.h GEN limits.h GEN locale.h GEN signal.h GEN stdio.h GEN stdlib.h GEN string.h GEN sys/stat.h GEN sys/types.h GEN time.h GEN unistd.h GEN unistr.h GEN unitypes.h GEN uniwidth.h GEN wchar.h GEN wctype.h make all-am make[3]: Entering directory '/tmp/grep-3.3/lib' CC argmatch.o CC binary-io.o CC bitrotate.o CC c-ctype.o CC c-stack.o CC c-strcasecmp.o CC c-strncasecmp.o CC cloexec.o CC close-stream.o CC closeout.o CC cycle-check.o CC dfa.o CC localeinfo.o CC dirname-lgpl.o CC basename-lgpl.o CC stripslash.o CC exclude.o CC exitfail.o CC creat-safer.o CC open-safer.o CC fd-hook.o CC fd-safer-flag.o CC dup-safer-flag.o CC filenamecat-lgpl.o CC getprogname.o CC hard-locale.o CC hash.o CC i-ring.o CC localcharset.o CC glthread/lock.o CC malloca.o CC mbchar.o CC mbiter.o CC mbscasecmp.o CC mbslen.o CC mbsstr.o CC mbuiter.o CC memchr2.o CC openat-die.o CC openat-safer.o CC opendirat.o CC propername.o CC quotearg.o CC safe-read.o CC save-cwd.o CC sig-handler.o CC stat-time.o CC striconv.o CC strnlen1.o CC glthread/threadlib.o CC trim.o CC unistd.o CC dup-safer.o CC fd-safer.o CC pipe-safer.o CC unistr/u8-mbtoucr.o CC unistr/u8-uctomb.o CC unistr/u8-uctomb-aux.o CC uniwidth/width.o CC version-etc.o CC version-etc-fsf.o CC wctype-h.o CC xmalloc.o CC xalloc-die.o CC xbinary-io.o CC xstriconv.o CC xstrtoimax.o CC xstrtol.o CC xstrtoul.o CC xstrtol-error.o CC colorize.o CC chdir-long.o CC fcntl.o CC fts.o CC mbrlen.o CC mbrtowc.o CC obstack.o CC openat-proc.o CC regex.o CC strstr.o AR libgreputils.a make[3]: Leaving directory '/tmp/grep-3.3/lib' make[2]: Leaving directory '/tmp/grep-3.3/lib' Making all in doc make[2]: Entering directory '/tmp/grep-3.3/doc' GEN grep.1 GEN fgrep.1 GEN egrep.1 make[2]: Leaving directory '/tmp/grep-3.3/doc' Making all in src make[2]: Entering directory '/tmp/grep-3.3/src' CC dfasearch.o CC grep.o CC kwsearch.o CC kwset.o CC pcresearch.o CC searchutils.o CCLD grep GEN egrep GEN fgrep make[2]: Leaving directory '/tmp/grep-3.3/src' Making all in tests make[2]: Entering directory '/tmp/grep-3.3/tests' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/tmp/grep-3.3/tests' Making all in gnulib-tests make[2]: Entering directory '/tmp/grep-3.3/gnulib-tests' GEN arpa/inet.h GEN sys/ioctl.h GEN sys/select.h GEN sys/socket.h GEN sys/time.h GEN sys/uio.h make all-recursive make[3]: Entering directory '/tmp/grep-3.3/gnulib-tests' Making all in . make[4]: Entering directory '/tmp/grep-3.3/gnulib-tests' CC test-localcharset.o CC hash-pjw.o CC imaxtostr.o CC inttostr.o CC offtostr.o CC uinttostr.o CC umaxtostr.o CC localename.o CC localename-table.o CC sockets.o CC sys_socket.o CC xsize.o CC asnprintf.o CC ioctl.o CC localtime-buffer.o CC nanosleep.o CC printf-args.o CC printf-parse.o CC strerror_r.o CC vasnprintf.o AR libtests.a CCLD test-localcharset make[4]: Leaving directory '/tmp/grep-3.3/gnulib-tests' make[3]: Leaving directory '/tmp/grep-3.3/gnulib-tests' make[2]: Leaving directory '/tmp/grep-3.3/gnulib-tests' make[2]: Entering directory '/tmp/grep-3.3' make[2]: Leaving directory '/tmp/grep-3.3' make[1]: Leaving directory '/tmp/grep-3.3' $ make install Making install in po make[1]: Entering directory '/tmp/grep-3.3/po' installing af.gmo as /tmp/test/share/locale/af/LC_MESSAGES/grep.mo installing be.gmo as /tmp/test/share/locale/be/LC_MESSAGES/grep.mo installing bg.gmo as /tmp/test/share/locale/bg/LC_MESSAGES/grep.mo installing ca.gmo as /tmp/test/share/locale/ca/LC_MESSAGES/grep.mo installing cs.gmo as /tmp/test/share/locale/cs/LC_MESSAGES/grep.mo installing da.gmo as /tmp/test/share/locale/da/LC_MESSAGES/grep.mo installing de.gmo as /tmp/test/share/locale/de/LC_MESSAGES/grep.mo installing el.gmo as /tmp/test/share/locale/el/LC_MESSAGES/grep.mo installing eo.gmo as /tmp/test/share/locale/eo/LC_MESSAGES/grep.mo installing es.gmo as /tmp/test/share/locale/es/LC_MESSAGES/grep.mo installing et.gmo as /tmp/test/share/locale/et/LC_MESSAGES/grep.mo installing eu.gmo as /tmp/test/share/locale/eu/LC_MESSAGES/grep.mo installing fi.gmo as /tmp/test/share/locale/fi/LC_MESSAGES/grep.mo installing fr.gmo as /tmp/test/share/locale/fr/LC_MESSAGES/grep.mo installing ga.gmo as /tmp/test/share/locale/ga/LC_MESSAGES/grep.mo installing gl.gmo as /tmp/test/share/locale/gl/LC_MESSAGES/grep.mo installing he.gmo as /tmp/test/share/locale/he/LC_MESSAGES/grep.mo installing hr.gmo as /tmp/test/share/locale/hr/LC_MESSAGES/grep.mo installing hu.gmo as /tmp/test/share/locale/hu/LC_MESSAGES/grep.mo installing id.gmo as /tmp/test/share/locale/id/LC_MESSAGES/grep.mo installing it.gmo as /tmp/test/share/locale/it/LC_MESSAGES/grep.mo installing ja.gmo as /tmp/test/share/locale/ja/LC_MESSAGES/grep.mo installing ko.gmo as /tmp/test/share/locale/ko/LC_MESSAGES/grep.mo installing ky.gmo as /tmp/test/share/locale/ky/LC_MESSAGES/grep.mo installing lt.gmo as /tmp/test/share/locale/lt/LC_MESSAGES/grep.mo installing nb.gmo as /tmp/test/share/locale/nb/LC_MESSAGES/grep.mo installing nl.gmo as /tmp/test/share/locale/nl/LC_MESSAGES/grep.mo installing pa.gmo as /tmp/test/share/locale/pa/LC_MESSAGES/grep.mo installing pl.gmo as /tmp/test/share/locale/pl/LC_MESSAGES/grep.mo installing pt.gmo as /tmp/test/share/locale/pt/LC_MESSAGES/grep.mo installing pt_BR.gmo as /tmp/test/share/locale/pt_BR/LC_MESSAGES/grep.mo installing ro.gmo as /tmp/test/share/locale/ro/LC_MESSAGES/grep.mo installing ru.gmo as /tmp/test/share/locale/ru/LC_MESSAGES/grep.mo installing sk.gmo as /tmp/test/share/locale/sk/LC_MESSAGES/grep.mo installing sl.gmo as /tmp/test/share/locale/sl/LC_MESSAGES/grep.mo installing sr.gmo as /tmp/test/share/locale/sr/LC_MESSAGES/grep.mo installing sv.gmo as /tmp/test/share/locale/sv/LC_MESSAGES/grep.mo installing th.gmo as /tmp/test/share/locale/th/LC_MESSAGES/grep.mo installing tr.gmo as /tmp/test/share/locale/tr/LC_MESSAGES/grep.mo installing uk.gmo as /tmp/test/share/locale/uk/LC_MESSAGES/grep.mo installing vi.gmo as /tmp/test/share/locale/vi/LC_MESSAGES/grep.mo installing zh_CN.gmo as /tmp/test/share/locale/zh_CN/LC_MESSAGES/grep.mo installing zh_TW.gmo as /tmp/test/share/locale/zh_TW/LC_MESSAGES/grep.mo if test "grep" = "gettext-tools"; then \ /bin/mkdir -p /tmp/test/share/gettext/po; \ for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot Makevars.template; do \ /usr/bin/install -c -m 644 ./$file \ /tmp/test/share/gettext/po/$file; \ done; \ for file in Makevars; do \ rm -f /tmp/test/share/gettext/po/$file; \ done; \ else \ : ; \ fi make[1]: Leaving directory '/tmp/grep-3.3/po' Making install in lib make[1]: Entering directory '/tmp/grep-3.3/lib' make install-am make[2]: Entering directory '/tmp/grep-3.3/lib' make[3]: Entering directory '/tmp/grep-3.3/lib' make[3]: Nothing to be done for 'install-exec-am'. make[3]: Nothing to be done for 'install-data-am'. make[3]: Leaving directory '/tmp/grep-3.3/lib' make[2]: Leaving directory '/tmp/grep-3.3/lib' make[1]: Leaving directory '/tmp/grep-3.3/lib' Making install in doc make[1]: Entering directory '/tmp/grep-3.3/doc' make[2]: Entering directory '/tmp/grep-3.3/doc' make[2]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p '/tmp/test/share/info' /usr/bin/install -c -m 644 ./grep.info '/tmp/test/share/info' install-info --info-dir='/tmp/test/share/info' '/tmp/test/share/info/grep.info' /bin/mkdir -p '/tmp/test/share/man/man1' /usr/bin/install -c -m 644 grep.1 fgrep.1 egrep.1 '/tmp/test/share/man/man1' make[2]: Leaving directory '/tmp/grep-3.3/doc' make[1]: Leaving directory '/tmp/grep-3.3/doc' Making install in src make[1]: Entering directory '/tmp/grep-3.3/src' make[2]: Entering directory '/tmp/grep-3.3/src' /bin/mkdir -p '/tmp/test/bin' /usr/bin/install -c grep '/tmp/test/bin' /bin/mkdir -p '/tmp/test/bin' /usr/bin/install -c egrep fgrep '/tmp/test/bin' make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/tmp/grep-3.3/src' make[1]: Leaving directory '/tmp/grep-3.3/src' Making install in tests make[1]: Entering directory '/tmp/grep-3.3/tests' make[2]: Entering directory '/tmp/grep-3.3/tests' make[2]: Nothing to be done for 'install-exec-am'. make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/tmp/grep-3.3/tests' make[1]: Leaving directory '/tmp/grep-3.3/tests' Making install in gnulib-tests make[1]: Entering directory '/tmp/grep-3.3/gnulib-tests' make install-recursive make[2]: Entering directory '/tmp/grep-3.3/gnulib-tests' Making install in . make[3]: Entering directory '/tmp/grep-3.3/gnulib-tests' make[4]: Entering directory '/tmp/grep-3.3/gnulib-tests' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/tmp/grep-3.3/gnulib-tests' make[3]: Leaving directory '/tmp/grep-3.3/gnulib-tests' make[2]: Leaving directory '/tmp/grep-3.3/gnulib-tests' make[1]: Leaving directory '/tmp/grep-3.3/gnulib-tests' make[1]: Entering directory '/tmp/grep-3.3' make[2]: Entering directory '/tmp/grep-3.3' make[2]: Nothing to be done for 'install-exec-am'. make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/tmp/grep-3.3' make[1]: Leaving directory '/tmp/grep-3.3' $ echo ba | LANG=ja_JP.eucjp /tmp/test/bin/grep -F -w a ba The bug still appears. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 16 12:34:34 2019 Received: (at 38223) by debbugs.gnu.org; 16 Nov 2019 17:34:34 +0000 Received: from localhost ([127.0.0.1]:39680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iW1xy-0000ft-5m for submit@debbugs.gnu.org; Sat, 16 Nov 2019 12:34:34 -0500 Received: from mail-wr1-f44.google.com ([209.85.221.44]:41955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iW1xp-0000fV-2a for 38223@debbugs.gnu.org; Sat, 16 Nov 2019 12:34:30 -0500 Received: by mail-wr1-f44.google.com with SMTP id b18so13128195wrj.8 for <38223@debbugs.gnu.org>; Sat, 16 Nov 2019 09:34:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dIh4dvubp4DcM7TNd5CWCdmArJdSb+lJ7WVeKoVRJa8=; b=Lsy2rRHYRGkRD1HmqgAlePMXuIH6ssrxEoBn9gSwxH1bwvjCqO2UXgSsdDu1casOFM kDDixavjLkBTlgJwCCdwZlS5sXw2f2Sphof0tz3C20PL0D9x2TXPT3YzRdaXqCiu4QFS vhwy/2Fc7qy0CB2vH16GwFRzOfEP+qZ+0ml0yZFj43Jokd31wLkECgEsaILa7/nWCPd5 kuzC71CEamQc9KimOtEQ6RKv9qxfhIIg39/vCJ01Ssj5cCPbb/nUaKLSs2a5aDbnTaaZ d+7T2VZPAFC1xBywGNuhZ7LkYR8s2phkHEhDnsaG6oS0YNgDr0Nr7kVefCTs+YXy/xRy GtnQ== X-Gm-Message-State: APjAAAWUUqdHuu0XcwJEpJbhN6K+xOHfk0d7V5MHabvLaU3h5bf9ogfq UDyuZ05k8Bs3kU87zmRWUpwrBmCcPUSA9bP++1hEog== X-Google-Smtp-Source: APXvYqzFiaAe1HO2Dvqqdc5igJ4KWfQ5Zn7SwQLkf0qeFe1vwK31hyDfODf5CPuSayZY4KBlnxY3N4L71ghr1qIpO3s= X-Received: by 2002:adf:8b01:: with SMTP id n1mr23364807wra.227.1573925659010; Sat, 16 Nov 2019 09:34:19 -0800 (PST) MIME-Version: 1.0 References: <20191116.040651.08427536.nide@yamane.local.nara-wu.ac.jp> In-Reply-To: <20191116.040651.08427536.nide@yamane.local.nara-wu.ac.jp> From: Jim Meyering Date: Sat, 16 Nov 2019 09:34:06 -0800 Message-ID: Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp To: "NIDE, Naoyuki" Content-Type: multipart/mixed; boundary="000000000000cf8b6505977a1f1c" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38223 Cc: 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --000000000000cf8b6505977a1f1c Content-Type: text/plain; charset="UTF-8" On Fri, Nov 15, 2019 at 11:54 AM NIDE, Naoyuki wrote: > echo ba | LANG=ja_JP.eucjp grep -F -w a > outputs ba, but should output nothing. Thank you for that report. It is reproducible for me on Fedora 30. Here is a fix, but the commit is incomplete: I am still in the process of preparing a test case and the NEWS entry. Will also fix the erroneous comment just below in a separate patch. --000000000000cf8b6505977a1f1c Content-Type: application/octet-stream; name="grep-Fw-mb-non-utf8.diff" Content-Disposition: attachment; filename="grep-Fw-mb-non-utf8.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k31ukyiy0 RnJvbSBmOWRmMjAwNmRmZDE4NDBlNGU3OTNiMGE0NGQzMzE4ZmQ0ZmIwYTA5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gTWV5ZXJpbmcgPG1leWVyaW5nQGZiLmNvbT4KRGF0ZTog U2F0LCAxNiBOb3YgMjAxOSAwOToyNDowMCAtMDgwMApTdWJqZWN0OiBbUEFUQ0hdIGdyZXA6IGF2 b2lkIGZhbHNlIC1GdyBtYXRjaCBpbiBub24tVVRGOCBtdWx0aWJ5dGUgbG9jYWxlcwoKRm9yIGV4 YW1wbGUsIHRoaXMgY29tbWFuZCB3b3VsZCBlcnJvbmVvdXNseSBwcmludCBpdHMgaW5wdXQgbGlu ZToKICBlY2hvIGFiIHwgTENfQ1RZUEU9amFfSlAuZXVjanAgZ3JlcCAtRncgYgoqIHNyYy9rd3Nl YXJjaC5jIChGZXhlY3V0ZSk6IFNldCBNQl9TVEFSVCBhbHNvIHdoZW4gdGhlcmUgaXMgbm8KcHJl Y2VkaW5nIG5ld2xpbmUuClJlcG9ydGVkIGJ5IE5JREUsIE5hb3l1a2kgaW4gaHR0cHM6Ly9idWdz LmdudS5vcmcvMzgyMjMuCi0tLQogc3JjL2t3c2VhcmNoLmMgfCA4ICsrKysrLS0tCiAxIGZpbGUg Y2hhbmdlZCwgNSBpbnNlcnRpb25zKCspLCAzIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL3Ny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cmV2IChtYl9zdGFydCwgYmVnLCBidWYgKyBzaXplKSkKICAgICAgICAg Zm9yICg7OykKICAgICAgICAgICB7Ci0tIAoyLjI0LjAuMTU1LmdkOWY2ZjNiNjE5Cgo= --000000000000cf8b6505977a1f1c-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 16 14:01:00 2019 Received: (at 38223-done) by debbugs.gnu.org; 16 Nov 2019 19:01:00 +0000 Received: from localhost ([127.0.0.1]:39698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iW3Jc-0002hf-7Z for submit@debbugs.gnu.org; Sat, 16 Nov 2019 14:01:00 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:52584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iW3JZ-0002hQ-Jv for 38223-done@debbugs.gnu.org; Sat, 16 Nov 2019 14:00:59 -0500 Received: by mail-wm1-f65.google.com with SMTP id l1so13215060wme.2 for <38223-done@debbugs.gnu.org>; Sat, 16 Nov 2019 11:00:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h3aMw5HGN7YWS4P06nqH/YWOgQVa0RvRr07rlZ5E9SQ=; b=b4jsTPg5ITYG/J3+ShwOZnLMduI7KsmMMvgAWGUXvCyRIOsH16GlRJztIUWztDJ0A/ q6OPJzVD269wLl6NL1NEyRwYlSCKPOli4xHqvZdFrnJ3FIQx6ftTAcoWYbSOCSNAZUNG 05A5qOpoXuJcUEXyqvR1CAaabB8rJvd5jMmvsjgNdL0ocaxqgtzLDi4xHvCVyau2MGxo QJxZ7QvSjmQQkbMNzdSv7MREIzLtBLUtzJh6UW7h7QkfHESQG5627ibUr7S36IobR4SJ Wb/RcxYRZnQS3HT/l4u1k3vpIS5dxZEO6RkfAVCYsZHoQG8F0XIFB8Wxoj1xyoK6m8fl lM2A== X-Gm-Message-State: APjAAAVhUBTItJTfTUElFdqC9UTkjjWhrVdK6tDMJLUCxB3i0niC6AlF l8EHXh2xXBKjKXTmELpJVXINoaMBc1rJMnEyLTw5kBml X-Google-Smtp-Source: APXvYqzKlsbQr3FTOHocfE1rb153YKywYWYvrT0woDCEqRp2F1uTtfYwVRNXF/52bcNO53v3+ev1QoSmDMppXQg1lEo= X-Received: by 2002:a7b:cb59:: with SMTP id v25mr21505666wmj.159.1573930851501; Sat, 16 Nov 2019 11:00:51 -0800 (PST) MIME-Version: 1.0 References: <20191116.040651.08427536.nide@yamane.local.nara-wu.ac.jp> In-Reply-To: From: Jim Meyering Date: Sat, 16 Nov 2019 11:00:38 -0800 Message-ID: Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp To: "NIDE, Naoyuki" Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38223-done Cc: 38223-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Sat, Nov 16, 2019 at 9:34 AM Jim Meyering wrote: > On Fri, Nov 15, 2019 at 11:54 AM NIDE, Naoyuki wrote: > > echo ba | LANG=ja_JP.eucjp grep -F -w a > > outputs ba, but should output nothing. > > Thank you for that report. It is reproducible for me on Fedora 30. > Here is a fix, but the commit is incomplete: I am still in the process > of preparing a test case and the NEWS entry. > Will also fix the erroneous comment just below in a separate patch. I've pushed the complete fix here: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=090a4dbe03951e427f03f83be424caacc3303799 I've also fixed the comment and a variable name and updated gnulib to latest. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 16 19:01:36 2019 Received: (at 38223) by debbugs.gnu.org; 17 Nov 2019 00:01:36 +0000 Received: from localhost ([127.0.0.1]:39905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iW80W-0001R9-CM for submit@debbugs.gnu.org; Sat, 16 Nov 2019 19:01:36 -0500 Received: from mailgw02.kcn.ne.jp ([61.86.7.209]:44267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iW80T-0001Qp-23 for 38223@debbugs.gnu.org; Sat, 16 Nov 2019 19:01:34 -0500 Received: from mxs01-s (mailgw1.kcn.ne.jp [61.86.15.233]) by mailgw02.kcn.ne.jp (Postfix) with ESMTP id 806DDBF9A5 for <38223@debbugs.gnu.org>; Sun, 17 Nov 2019 09:01:25 +0900 (JST) X-matriXscan-loop-detect: 7c598f8c69b011b973b61fd53c205acdd683dd76 Received: from mail11.kcn.ne.jp ([61.86.6.129]) by mxs01-s with ESMTP; Sun, 17 Nov 2019 09:01:22 +0900 (JST) Received: from [10.120.1.116] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) by mail11.kcn.ne.jp (Postfix) with ESMTPA id 97A5B40A9DB2 for <38223@debbugs.gnu.org>; Sun, 17 Nov 2019 09:01:22 +0900 (JST) Date: Sun, 17 Nov 2019 09:01:21 +0900 From: Norihiro Tanaka To: 38223@debbugs.gnu.org Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp In-Reply-To: References: Message-Id: <20191117090007.C509.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------_5DD08B2400000000C500_MULTIPART_MIXED_" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.74.02 [ja] X-matriXscan-msec-AV: Clean X-matriXscan-Action: Approve X-matriXscan: Uncategorized X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38223 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --------_5DD08B2400000000C500_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit On Sat, 16 Nov 2019 11:00:38 -0800 Jim Meyering wrote: > I've pushed the complete fix here: > https://git.savannah.gnu.org/cgit/grep.git/commit/?id=090a4dbe03951e427f03f83be424caacc3303799 > > I've also fixed the comment and a variable name and updated gnulib to latest. After patched, I found extreamly slowdown. yes $(printf %040d 0) | head -1000000 >k time -p env LC_ALL=ja_JP.eucjp src/grep -F -w 0 k First patch fixes it, and second improves performance more. --------_5DD08B2400000000C500_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII"; name="0001-grep-fix-performance-degration-with-previous-patch.patch" Content-Disposition: attachment; filename="0001-grep-fix-performance-degration-with-previous-patch.patch" Content-Transfer-Encoding: base64 RnJvbSAwMjAyYTgzYjNkMGRlMjI0YTVkNjA2OTU4ZTM3MTkyNDRkNTQ2NTQ4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOb3JpaGlybyBUYW5ha2EgPG5vcml0bmtAa2NuLm5lLmpwPgpE YXRlOiBTdW4sIDE3IE5vdiAyMDE5IDA3OjIwOjQxICswOTAwClN1YmplY3Q6IFtQQVRDSCAxLzJd IGdyZXA6IGZpeCBwZXJmb3JtYW5jZSBkZWdyYXRpb24gd2l0aCBwcmV2aW91cyBwYXRjaAoKKiBz cmMva3dzZWFyY2guYyAoRmV4ZWN1dGUpOiBBdm9pZCB1bm5lY2Vzc2FyeSBiYWNrd2FyZHMgaW4g bm9uLVVURjgKbXVsdGlieXRlIGxvY2FsZXMuCi0tLQogc3JjL2t3c2VhcmNoLmMgfCAgIDE1ICsr KysrKysrKysrKy0tLQogMSBmaWxlcyBjaGFuZ2VkLCAxMiBpbnNlcnRpb25zKCspLCAzIGRlbGV0 aW9ucyg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AgICB9CiAKICAgICAgIC8qIFN1Y2NlZWQgaWYgbmVpdGhl ciB0aGUgcHJlY2VkaW5nIG5vciB0aGUgZm9sbG93aW5nIGNoYXJhY3RlciBpcyBhCiAgICAgICAg ICB3b3JkIGNvbnN0aXR1ZW50LiAgSWYgdGhlIHByZWNlZGluZyBpcyBub3QsIHlldCB0aGUgZm9s bG93aW5nCi0tIAoxLjcuMQoK --------_5DD08B2400000000C500_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII"; name="0002-grep-performance-improvement-for-grep-F-w-in-non-UTF.patch" Content-Disposition: attachment; filename="0002-grep-performance-improvement-for-grep-F-w-in-non-UTF.patch" Content-Transfer-Encoding: base64 RnJvbSA3YzY5OTBiNjgxOGUyZGVjODljNTQxNTY3M2ExMTIyOTM1OThjMGI4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOb3JpaGlybyBUYW5ha2EgPG5vcml0bmtAa2NuLm5lLmpwPgpE YXRlOiBTdW4sIDE3IE5vdiAyMDE5IDA3OjI5OjE1ICswOTAwClN1YmplY3Q6IFtQQVRDSCAyLzJd IGdyZXA6IHBlcmZvcm1hbmNlIGltcHJvdmVtZW50IGZvciBncmVwIC1GIC13IGluIG5vbi1VVEY4 IG11bHRpYnl0ZSBsb2NhbGVzCgoqIHNyYy9zZWFyY2h1dGlscy5jIChtYl9nb2JhY2spOiBBZGQg YXJndW1lbnQuIEFsbCBjYWxsZXJzIGNoYW5nZWQuCiogc3JjL3NlYXJjaC5oIChtYl9nb2JhY2sp OiBVcGRhdGUgcHJvdG90eXBlLgoqIHNyYy9rd3NlYXJjaC5jIChGZXhlY3V0ZSk6IFVzZSBvdXRw dXQgZnJvbSBtYl9nb2JhY2sgd2hlbiBjaGVjawp3b3JkLWJvdW5kYXJ5LgotLS0KIHNyYy9kZmFz ZWFyY2guYyAgIHwgICAgMiArLQogc3JjL2t3c2VhcmNoLmMgICAgfCAgIDE1ICsrKysrKysrLS0t LS0tLQog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AmJiAoKmN1 ciAmIDB4YzApID09IDB4ODApCiAgICAgICAgIGZvciAoaW50IGkgPSAxOyBpIDw9IDM7IGkrKykK ICAgICAgICAgICBpZiAoKGN1clstaV0gJiAweGMwKSAhPSAweDgwKQogICAgICAgICAgICAgewog ICAgICAgICAgICAgICBtYnN0YXRlX3QgbWJzID0geyAwIH07Ci0gICAgICAgICAgICAgIHNpemVf dCBjbGVuID0gbWJfY2xlbiAoY3VyIC0gaSwgZW5kIC0gKGN1ciAtIGkpLCAmbWJzKTsKKyAgICAg ICAgICAgICAgY2xlbiA9IG1iX2NsZW4gKGN1ciAtIGksIGVuZCAtIChjdXIgLSBpKSwgJm1icyk7 CiAgICAgICAgICAgICAgIGlmIChpIDwgY2xlbiAmJiBjbGVuIDwgKHNpemVfdCkgLTIpCiAgICAg ICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgcDAgPSBjdXIgLSBpOwpAQCAtMTE0LDcg KzExNyw3IEBAIG1iX2dvYmFjayAoY2hhciBjb25zdCAqKm1iX3N0YXJ0LCBjaGFyIGNvbnN0ICpj dXIsIGNoYXIgY29uc3QgKmVuZCkKICAgICAgIG1ic3RhdGVfdCBtYnMgPSB7IDAgfTsKICAgICAg IGRvCiAgICAgICAgIHsKLSAgICAgICAgICBzaXplX3QgY2xlbiA9IG1iX2NsZW4gKHAsIGVuZCAt IHAsICZtYnMpOworICAgICAgICAgIGNsZW4gPSBtYl9jbGVuIChwLCBlbmQgLSBwLCAmbWJzKTsK IAogICAgICAgICAgIGlmICgoc2l6ZV90KSAtMiA8PSBjbGVuKQogICAgICAgICAgICAgewpAQCAt MTMwLDYgKzEzMyw4IEBAIG1iX2dvYmFjayAoY2hhciBjb25zdCAqKm1iX3N0YXJ0LCBjaGFyIGNv bnN0ICpjdXIsIGNoYXIgY29uc3QgKmVuZCkKICAgICB9CiAKICAgKm1iX3N0YXJ0ID0gcDsKKyAg aWYgKG1iY2xlbikKKyAgICAqbWJjbGVuID0gY2xlbjsKICAgcmV0dXJuIHAgPT0gY3VyID8gMCA6 IGN1ciAtIHAwOwogfQogCkBAIC0xOTIsNiArMTk3LDYgQEAgd29yZGNoYXJfcHJldiAoY2hhciBj b25zdCAqYnVmLCBjaGFyIGNvbnN0ICpjdXIsIGNoYXIgY29uc3QgKmVuZCkKICAgICAgIHx8IChs b2NhbGVpbmZvLnVzaW5nX3V0ZjggJiYgbG9jYWxlaW5mby5zYmNsZW5bYl0gIT0gLTIpKQogICAg IHJldHVybiBzYndvcmRjaGFyW2JdOwogICBjaGFyIGNvbnN0ICpwID0gYnVmOwotICBjdXIgLT0g bWJfZ29iYWNrICgmcCwgY3VyLCBlbmQpOworICBjdXIgLT0gbWJfZ29iYWNrICgmcCwgTlVMTCwg Y3VyLCBlbmQpOwogICByZXR1cm4gd29yZGNoYXJfbmV4dCAoY3VyLCBlbmQpOwogfQotLSAKMS43 LjEKCg== --------_5DD08B2400000000C500_MULTIPART_MIXED_-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 16 23:36:41 2019 Received: (at 38223) by debbugs.gnu.org; 17 Nov 2019 04:36:41 +0000 Received: from localhost ([127.0.0.1]:39952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWCIi-0007ih-PK for submit@debbugs.gnu.org; Sat, 16 Nov 2019 23:36:41 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWCIe-0007iR-GP for 38223@debbugs.gnu.org; Sat, 16 Nov 2019 23:36:39 -0500 Received: by mail-wr1-f65.google.com with SMTP id z10so15543843wrs.12 for <38223@debbugs.gnu.org>; Sat, 16 Nov 2019 20:36:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nlfeJPTTq9oZU2COXXyUKcOWOx/ozdQ9AXv+XMojcjY=; b=MLKLkkq5Eaa53E+K0OIJcBFvy2QKOjUqjYLtPT5Ys3eUY7RXZbMrF/aOo/yunyR/vs n6yRcKU80sNncTYvpXYN/MPLmXV18fj1MAO6bIVzPEy11yqhsKSj6VbgMxjAKl9WJ5rr rAuv1iMI3AWsWb3rtPCbf8gcA+GDqNlza7+fqnHvUPRRQYUC7fj7eW4KXAbbjMGgcU4S z88mB4o11knWfir9mexMtM+Mzl9PxCXdHv8PFsHxQWdgftjg1TzIOEpdB8523Lx8DNVX pJvKa8K19/7OtDdEXFS1vEt/UlD+NXt4xa9YJoZsa8hK0gvnLCKmFeT2uK6EHtdU9Odi +FDA== X-Gm-Message-State: APjAAAWIZlY4EZv5aiIFz3xU33irGIn0SdP3wT8+LhgwPuQY9ZjACsUB g5hYH6nKMsleNorAsn2yY5Dr0rCCEH2GXnLUVOo= X-Google-Smtp-Source: APXvYqynf7MkgiQGjDoySbYVP1x8vX2gJ3hKS/ANsWvOA0tMeSKDkhQ4MJ+37PO+wc4ud6L+IS6ExmCu9m3OWjUP9QI= X-Received: by 2002:a5d:490c:: with SMTP id x12mr10033508wrq.301.1573965390539; Sat, 16 Nov 2019 20:36:30 -0800 (PST) MIME-Version: 1.0 References: <20191117090007.C509.27F6AC2D@kcn.ne.jp> In-Reply-To: <20191117090007.C509.27F6AC2D@kcn.ne.jp> From: Jim Meyering Date: Sat, 16 Nov 2019 20:36:18 -0800 Message-ID: Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp To: Norihiro Tanaka Content-Type: multipart/mixed; boundary="000000000000fe15250597835ff0" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38223 Cc: 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --000000000000fe15250597835ff0 Content-Type: text/plain; charset="UTF-8" On Sat, Nov 16, 2019 at 4:02 PM Norihiro Tanaka wrote: > On Sat, 16 Nov 2019 11:00:38 -0800 > Jim Meyering wrote: > > > I've pushed the complete fix here: > > https://git.savannah.gnu.org/cgit/grep.git/commit/?id=090a4dbe03951e427f03f83be424caacc3303799 > > > > I've also fixed the comment and a variable name and updated gnulib to latest. > > After patched, I found extreamly slowdown. > > yes $(printf %040d 0) | head -1000000 >k > time -p env LC_ALL=ja_JP.eucjp src/grep -F -w 0 k > > First patch fixes it, and second improves performance more. Nice. Thank you! Those look fine, at first glance, modulo these minor changes that I expect to merge into the latter: --000000000000fe15250597835ff0 Content-Type: application/octet-stream; name="grep-touchup.diff" Content-Disposition: attachment; filename="grep-touchup.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k32ibi1r0 ZGlmZiAtLWdpdCBhL3NyYy9rd3NlYXJjaC5jIGIvc3JjL2t3c2VhcmNoLmMKaW5kZXggNDQyZWZj MS4uZjEyMTgxNiAxMDA2NDQKLS0tIGEvc3JjL2t3c2VhcmNoLmMKKysrIGIvc3JjL2t3c2VhcmNo LmMKQEAgLTIzMCwxNSArMjMwLDE0IEBAIEZleGVjdXRlICh2b2lkICp2Y3AsIGNoYXIgY29uc3Qg KmJ1Ziwgc2l6ZV90IHNpemUsIHNpemVfdCAqbWF0Y2hfc2l6ZSwKICAgICAgICAgIGlmIHRoZXJl IGlzIGEgcHJlY2VkaW5nIG5ld2xpbmUuICAqLwogICAgICAgaWYgKG1iY2xlbiA9PSAwKQogICAg ICAgICB7Ci0gICAgICAgICAgIGNoYXIgY29uc3QgKm5sID0gbWVtcmNociAobWJfc3RhcnQsIGVv bCwgYmVnIC0gbWJfc3RhcnQpOwotICAgICAgICAgICBpZiAobmwpCi0gICAgICAgICAgICAgbWJf c3RhcnQgPSBubCArIDE7CisgICAgICAgICAgY2hhciBjb25zdCAqbmwgPSBtZW1yY2hyIChtYl9z dGFydCwgZW9sLCBiZWcgLSBtYl9zdGFydCk7CisgICAgICAgICAgaWYgKG5sKQorICAgICAgICAg ICAgbWJfc3RhcnQgPSBubCArIDE7CiAgICAgICAgIH0KCiAgICAgICAvKiBTdWNjZWVkIGlmIG5l aXRoZXIgdGhlIHByZWNlZGluZyBub3IgdGhlIGZvbGxvd2luZyBjaGFyYWN0ZXIgaXMgYQogICAg ICAgICAgd29yZCBjb25zdGl0dWVudC4gIElmIHRoZSBwcmVjZWRpbmcgaXMgbm90LCB5ZXQgdGhl IGZvbGxvd2luZwogICAgICAgICAgY2hhcmFjdGVyIElTIGEgd29yZCBjb25zdGl0dWVudCwga2Vl cCB0cnlpbmcgd2l0aCBzaG9ydGVyIG1hdGNoZXMuICAqLwotICAgICAgaWYgKCEgd29yZGNoYXJf cHJldiAobWJfc3RhcnQsIGJlZywgYnVmICsgc2l6ZSkpCiAgICAgICBpZiAobWJjbGVuID4gMAog ICAgICAgICAgID8gISB3b3JkY2hhcl9uZXh0IChiZWcgLSBtYmNsZW4sIGJ1ZiArIHNpemUpCiAg ICAgICAgICAgOiAhIHdvcmRjaGFyX3ByZXYgKG1iX3N0YXJ0LCBiZWcsIGJ1ZiArIHNpemUpKQo= --000000000000fe15250597835ff0-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 17 01:46:17 2019 Received: (at 38223) by debbugs.gnu.org; 17 Nov 2019 06:46:18 +0000 Received: from localhost ([127.0.0.1]:40043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWEK9-0007ai-Hi for submit@debbugs.gnu.org; Sun, 17 Nov 2019 01:46:17 -0500 Received: from mail-wm1-f42.google.com ([209.85.128.42]:37877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWEK7-0007UK-9c for 38223@debbugs.gnu.org; Sun, 17 Nov 2019 01:46:15 -0500 Received: by mail-wm1-f42.google.com with SMTP id b17so15220774wmj.2 for <38223@debbugs.gnu.org>; Sat, 16 Nov 2019 22:46:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Jfnrf6qDN4Hl4maw9SQzdnlyKxKFY618tK0h8hVfuy0=; b=RCTWSblShk+XeYU50mLQ4bWlgSh/imtpDHlfiJYdD+mYTsja9lTC5OgiiXOG0UfULH BmBUEVQfyPFr4mPW9+1hC1lGKpBLcA/ediRjOGI2oN5PzBe4EGnyo3e8fG5hlC2LM1FX NdiUzrRfgNonxlJEwY3sCLU+5sCm1UVVDUQYZHAC7/GVEBjbSvQEAzMauwKoV+kIK85d ulUrnnJQKOSTOzUQBtAmv57sdE6NtNjCkDcDRfVv28AGrK4+rdDUpCbr24epD1wVeVXz Onxso9hOR/Dg6ZShFq/8HV4RgvkfDXuIeoplrsN/iYViWfU207XyaTKejj8vpKtReW+n UqQw== X-Gm-Message-State: APjAAAWfAGDLkpqc1zUGaVjdCDuoyq3MLl8dAbcRU2K15k1brnOrLqGe A6YkQYd3bU4JBkJDv0/8slfUjMNtt3QnIzq2ZX8wdg== X-Google-Smtp-Source: APXvYqx6Sy/aEBBYpCCuf+bjQo/1elnS/ZffVjFGi3Ulm10tGUOzIhRZqfYkBhhcUVnfcnwxBEQtSXn2mbv8Elj5oQY= X-Received: by 2002:a1c:9dd3:: with SMTP id g202mr24131811wme.43.1573973169270; Sat, 16 Nov 2019 22:46:09 -0800 (PST) MIME-Version: 1.0 References: <20191117090007.C509.27F6AC2D@kcn.ne.jp> In-Reply-To: From: Jim Meyering Date: Sat, 16 Nov 2019 22:45:56 -0800 Message-ID: Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp To: Norihiro Tanaka Content-Type: multipart/mixed; boundary="000000000000a40d3e0597852fb1" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38223 Cc: 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --000000000000a40d3e0597852fb1 Content-Type: text/plain; charset="UTF-8" On Sat, Nov 16, 2019 at 8:36 PM Jim Meyering wrote: > On Sat, Nov 16, 2019 at 4:02 PM Norihiro Tanaka wrote: > > On Sat, 16 Nov 2019 11:00:38 -0800 > > Jim Meyering wrote: > > > > > I've pushed the complete fix here: > > > https://git.savannah.gnu.org/cgit/grep.git/commit/?id=090a4dbe03951e427f03f83be424caacc3303799 > > > > > > I've also fixed the comment and a variable name and updated gnulib to latest. > > > > After patched, I found extreamly slowdown. > > > > yes $(printf %040d 0) | head -1000000 >k > > time -p env LC_ALL=ja_JP.eucjp src/grep -F -w 0 k > > > > First patch fixes it, and second improves performance more. > > Nice. Thank you! > Those look fine, at first glance, modulo these minor changes that I > expect to merge into the latter: Thanks again, Norihiro Tanaka. I have also adjusted commit log wording and added comments for the new mbclen parameter. I've attached the two commits that I expect to push tomorrow, assuming no objection. --000000000000a40d3e0597852fb1 Content-Type: application/octet-stream; name="grep-Fw-performance-fix.diff" Content-Disposition: attachment; filename="grep-Fw-performance-fix.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k32mz5hs0 RnJvbSAwYTg4ZjZjMjUwNjVjZjUyNThlMTllNDBlZTdhMjIxMzM5OTVkOTZhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOb3JpaGlybyBUYW5ha2EgPG5vcml0bmtAa2NuLm5lLmpwPgpE YXRlOiBTdW4sIDE3IE5vdiAyMDE5IDA3OjIwOjQxICswOTAwClN1YmplY3Q6IFtQQVRDSCAxLzJd IGdyZXA6IGZpeCBwZXJmb3JtYW5jZSBkZWdyYWRhdGlvbiB3aXRoIH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0IGNo YXIgKnAgPSAqbWJfc3RhcnQ7CiAgIGNvbnN0IGNoYXIgKnAwID0gcDsKKyAgc2l6ZV90IGNsZW47 CgogICBpZiAoY3VyIDw9IHApCiAgICAgcmV0dXJuIGN1ciAtIHA7CkBAIC05NCwxMyArOTcsMTQg QEAgbWJfZ29iYWNrIChjaGFyIGNvbnN0ICoqbWJfc3RhcnQsIGNoYXIgY29uc3QgKmN1ciwgY2hh ciBjb25zdCAqZW5kKQogICBpZiAobG9jYWxlaW5mby51c2luZ191dGY4KQogICAgIHsKICAgICAg IHAgPSBjdXI7CisgICAgICBjbGVuID0gMTsKCiAgICAgICBpZiAoY3VyIDwgZW5kICYmICgqY3Vy ICYgMHhjMCkgPT0gMHg4MCkKICAgICAgICAgZm9yIChpbnQgaSA9IDE7IGkgPD0gMzsgaSsrKQog ICAgICAgICAgIGlmICgoY3VyWy1pXSAmIDB4YzApICE9IDB4ODApCiAgICAgICAgICAgICB7CiAg ICAgICAgICAgICAgIG1ic3RhdGVfdCBtYnMgPSB7IDAgfTsKLSAgICAgICAgICAgICAgc2l6ZV90 IGNsZW4gPSBtYl9jbGVuIChjdXIgLSBpLCBlbmQgLSAoY3VyIC0gaSksICZtYnMpOworICAgICAg ICAgICAgICBjbGVuID0gbWJfY2xlbiAoY3VyIC0gaSwgZW5kIC0gKGN1ciAtIGkpLCAmbWJzKTsK ICAgICAgICAgICAgICAgaWYgKGkgPCBjbGVuICYmIGNsZW4gPCAoc2l6ZV90KSAtMikKICAgICAg ICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICBwMCA9IGN1ciAtIGk7CkBAIC0xMTQsNyAr MTE4LDcgQEAgbWJfZ29iYWNrIChjaGFyIGNvbnN0ICoqbWJfc3RhcnQsIGNoYXIgY29uc3QgKmN1 ciwgY2hhciBjb25zdCAqZW5kKQogICAgICAgbWJzdGF0ZV90IG1icyA9IHsgMCB9OwogICAgICAg ZG8KICAgICAgICAgewotICAgICAgICAgIHNpemVfdCBjbGVuID0gbWJfY2xlbiAocCwgZW5kIC0g cCwgJm1icyk7CisgICAgICAgICAgY2xlbiA9IG1iX2NsZW4gKHAsIGVuZCAtIHAsICZtYnMpOwoK ICAgICAgICAgICBpZiAoKHNpemVfdCkgLTIgPD0gY2xlbikKICAgICAgICAgICAgIHsKQEAgLTEz MCw2ICsxMzQsOCBAQCBtYl9nb2JhY2sgKGNoYXIgY29uc3QgKiptYl9zdGFydCwgY2hhciBjb25z dCAqY3VyLCBjaGFyIGNvbnN0ICplbmQpCiAgICAgfQoKICAgKm1iX3N0YXJ0ID0gcDsKKyAgaWYg KG1iY2xlbikKKyAgICAqbWJjbGVuID0gY2xlbjsKICAgcmV0dXJuIHAgPT0gY3VyID8gMCA6IGN1 ciAtIHAwOwogfQoKQEAgLTE5Miw2ICsxOTgsNiBAQCB3b3JkY2hhcl9wcmV2IChjaGFyIGNvbnN0 ICpidWYsIGNoYXIgY29uc3QgKmN1ciwgY2hhciBjb25zdCAqZW5kKQogICAgICAgfHwgKGxvY2Fs ZWluZm8udXNpbmdfdXRmOCAmJiBsb2NhbGVpbmZvLnNiY2xlbltiXSAhPSAtMikpCiAgICAgcmV0 dXJuIHNid29yZGNoYXJbYl07CiAgIGNoYXIgY29uc3QgKnAgPSBidWY7Ci0gIGN1ciAtPSBtYl9n b2JhY2sgKCZwLCBjdXIsIGVuZCk7CisgIGN1ciAtPSBtYl9nb2JhY2sgKCZwLCBOVUxMLCBjdXIs IGVuZCk7CiAgIHJldHVybiB3b3JkY2hhcl9uZXh0IChjdXIsIGVuZCk7CiB9Ci0tIAoyLjI0LjAu MTU1LmdkOWY2ZjNiNjE5Cgo= --000000000000a40d3e0597852fb1-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 17 03:04:32 2019 Received: (at 38223) by debbugs.gnu.org; 17 Nov 2019 08:04:32 +0000 Received: from localhost ([127.0.0.1]:40191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWFXs-0003Pa-6K for submit@debbugs.gnu.org; Sun, 17 Nov 2019 03:04:32 -0500 Received: from mailgw05.kcn.ne.jp ([61.86.7.212]:44251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWFXp-0003PI-Hv for 38223@debbugs.gnu.org; Sun, 17 Nov 2019 03:04:30 -0500 Received: from mxs01-s (mailgw1.kcn.ne.jp [61.86.15.233]) by mailgw05.kcn.ne.jp (Postfix) with ESMTP id 61A7188060C for <38223@debbugs.gnu.org>; Sun, 17 Nov 2019 17:04:20 +0900 (JST) X-matriXscan-loop-detect: 8711ff60ef722fccb04917fb5c250692216b6216 Received: from mail11.kcn.ne.jp ([61.86.6.129]) by mxs01-s with ESMTP; Sun, 17 Nov 2019 17:04:19 +0900 (JST) Received: from [10.120.1.116] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) by mail11.kcn.ne.jp (Postfix) with ESMTPA id BEAFD40BE6E5; Sun, 17 Nov 2019 17:04:19 +0900 (JST) Date: Sun, 17 Nov 2019 17:04:18 +0900 From: Norihiro Tanaka To: Jim Meyering Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp In-Reply-To: References: Message-Id: <20191117170418.C50D.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.74.02 [ja] X-matriXscan-msec-AV: Clean X-matriXscan-Action: Approve X-matriXscan: Uncategorized X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38223 Cc: 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 16 Nov 2019 22:45:56 -0800 Jim Meyering wrote: > On Sat, Nov 16, 2019 at 8:36 PM Jim Meyering wrote: > > On Sat, Nov 16, 2019 at 4:02 PM Norihiro Tanaka wrote: > > > On Sat, 16 Nov 2019 11:00:38 -0800 > > > Jim Meyering wrote: > > > > > > > I've pushed the complete fix here: > > > > https://git.savannah.gnu.org/cgit/grep.git/commit/?id=090a4dbe03951e427f03f83be424caacc3303799 > > > > > > > > I've also fixed the comment and a variable name and updated gnulib to latest. > > > > > > After patched, I found extreamly slowdown. > > > > > > yes $(printf %040d 0) | head -1000000 >k > > > time -p env LC_ALL=ja_JP.eucjp src/grep -F -w 0 k > > > > > > First patch fixes it, and second improves performance more. > > > > Nice. Thank you! > > Those look fine, at first glance, modulo these minor changes that I > > expect to merge into the latter: > > Thanks again, Norihiro Tanaka. > I have also adjusted commit log wording and added comments for the new > mbclen parameter. I've attached the two commits that I expect to push > tomorrow, assuming no objection. Thanks for the adjustment. I have no objection to the content. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 17 10:16:44 2019 Received: (at 38223) by debbugs.gnu.org; 17 Nov 2019 15:16:45 +0000 Received: from localhost ([127.0.0.1]:42359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWMI8-0002Jp-Lb for submit@debbugs.gnu.org; Sun, 17 Nov 2019 10:16:44 -0500 Received: from mail-wm1-f49.google.com ([209.85.128.49]:39932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWMI7-0002Jc-9n for 38223@debbugs.gnu.org; Sun, 17 Nov 2019 10:16:43 -0500 Received: by mail-wm1-f49.google.com with SMTP id t26so15978022wmi.4 for <38223@debbugs.gnu.org>; Sun, 17 Nov 2019 07:16:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YUnmS1CsVZhuOtUX5gHb6OO3y5PpiTt/TkVyzs+eJRk=; b=KdRjBqHSoXdmjgATbyyJU+QT9ozJkFqAkg0DrrSaXB95oXKwIW14C+N/Hv+8q9G/pH AuFAGag0otDnw/09x8KW3pAZ3oTsyvO11e++DAFDHEhpUVo3uRiZI8tlKtsHGWsoTsKW AooHD/aWfJc37L7izi4+3Uzw6tUha81OO4seX8Jruk508tCRNgJbQ/S9M1yGJ2v+ME4g Bc/VZyG+9GsEIdTFlpJxJvDGVGdJ5LYk/bMqLBtgJnIXcXz7TuslMLYTPCTSMU7u43Ly 79NkXJmzuG6SogI9JD+Z6AhySNorWapTkIszCGNwxEM/sfpS3vB2usGK35OoTDr27E8A qLtw== X-Gm-Message-State: APjAAAV4cUAILukV/P29BLp+cpY3XrW93+/gSUB8ysTrZN4b8mKuhqCD nOQDzCSUu54Be7R36pu1MRF8mdMEO6paM3of0dUaCw== X-Google-Smtp-Source: APXvYqwfgulopqlPzvcZEsFRGQ85STmA9fSTEEBGif/ne5B2+ixUb7AQuz/p7vraCqOwqh05OkmRaoJEtIpv6KoHGHI= X-Received: by 2002:a7b:c10c:: with SMTP id w12mr26030047wmi.114.1574003797323; Sun, 17 Nov 2019 07:16:37 -0800 (PST) MIME-Version: 1.0 References: <20191117170418.C50D.27F6AC2D@kcn.ne.jp> In-Reply-To: <20191117170418.C50D.27F6AC2D@kcn.ne.jp> From: Jim Meyering Date: Sun, 17 Nov 2019 07:16:24 -0800 Message-ID: Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp To: Norihiro Tanaka Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 38223 Cc: 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On Sun, Nov 17, 2019 at 12:04 AM Norihiro Tanaka wrote: > On Sat, 16 Nov 2019 22:45:56 -0800 > Jim Meyering wrote: > > > On Sat, Nov 16, 2019 at 8:36 PM Jim Meyering wrote: > > > On Sat, Nov 16, 2019 at 4:02 PM Norihiro Tanaka wrote: > > > > On Sat, 16 Nov 2019 11:00:38 -0800 > > > > Jim Meyering wrote: > > > > > > > > > I've pushed the complete fix here: > > > > > https://git.savannah.gnu.org/cgit/grep.git/commit/?id=090a4dbe03951e427f03f83be424caacc3303799 > > > > > > > > > > I've also fixed the comment and a variable name and updated gnulib to latest. > > > > > > > > After patched, I found extreamly slowdown. > > > > > > > > yes $(printf %040d 0) | head -1000000 >k > > > > time -p env LC_ALL=ja_JP.eucjp src/grep -F -w 0 k > > > > > > > > First patch fixes it, and second improves performance more. > > > > > > Nice. Thank you! > > > Those look fine, at first glance, modulo these minor changes that I > > > expect to merge into the latter: > > > > Thanks again, Norihiro Tanaka. > > I have also adjusted commit log wording and added comments for the new > > mbclen parameter. I've attached the two commits that I expect to push > > tomorrow, assuming no objection. > > Thanks for the adjustment. I have no objection to the content. Pushed both. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 17 11:28:17 2019 Received: (at 38223) by debbugs.gnu.org; 17 Nov 2019 16:28:17 +0000 Received: from localhost ([127.0.0.1]:42467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWNPN-00062j-AH for submit@debbugs.gnu.org; Sun, 17 Nov 2019 11:28:17 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWNPL-00062T-7H for 38223@debbugs.gnu.org; Sun, 17 Nov 2019 11:28:16 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id F094D1604E7; Sun, 17 Nov 2019 08:28:08 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gQhLP1Jy1Y12; Sun, 17 Nov 2019 08:28:08 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5310C1604E9; Sun, 17 Nov 2019 08:28:08 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xHtDZ3fMM_qs; Sun, 17 Nov 2019 08:28:08 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2BB961604E7; Sun, 17 Nov 2019 08:28:08 -0800 (PST) Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp To: Jim Meyering References: <20191117170418.C50D.27F6AC2D@kcn.ne.jp> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sun, 17 Nov 2019 08:28:04 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38223 Cc: Norihiro Tanaka , 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Thanks for fixing that. Although the patch says "[Bug#38223 introduced in grep 3.0]", the original bug report is against grep 2.28 and later. Can I take it that we tried to fix the bug in 3.0 but the fix was incomplete? From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 17 13:56:21 2019 Received: (at 38223) by debbugs.gnu.org; 17 Nov 2019 18:56:21 +0000 Received: from localhost ([127.0.0.1]:42641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWPie-00058f-Qy for submit@debbugs.gnu.org; Sun, 17 Nov 2019 13:56:21 -0500 Received: from mail-wr1-f45.google.com ([209.85.221.45]:40592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWPib-00058P-TL for 38223@debbugs.gnu.org; Sun, 17 Nov 2019 13:56:19 -0500 Received: by mail-wr1-f45.google.com with SMTP id q15so4079194wrw.7 for <38223@debbugs.gnu.org>; Sun, 17 Nov 2019 10:56:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cqekfF0Z7LFGkI+KN8EA+QqA6RmGQcu+DY56vYtGNRI=; b=PqCtgKkOjks/gNI0Iqac25a8Dh1Vbg7QeqjidE8MhU0j6PTljcQjCBhqEGDK+PVGqD tQ9S3zYMKaOECgNPOlFtS38OHnXZziPt0qM/RdLw5AndB2U2+jSu7z74NAbgl5lp4yej cShqdiVb6PdUU9IdGjTWeo/JjYNQkpAdEQYpbL9d64DT9ovDuYozQac6xuCxv4NdtYnW rsIZwgXqttUplfPHURQ1fvgiyGcSDqHXrMqmF8u6L+HxLU2SkEr0M8erJm/prApxhwYj gq9Bt5fxH8waUixKgVp8pt5u5s+ozs76SPUB8Z0mrtkwVKYIPGy+mpL/tNDHKLNzTqYd 1xDQ== X-Gm-Message-State: APjAAAVws5CMxVerw8BJhN1WxH+Y6pR2MNnNNIbv3mlt2p2J/HiyJY8q z+ibHAldVMnn2hnLaUs1cguXJajzFS4BcoHEWBY= X-Google-Smtp-Source: APXvYqxu59KSeE9dOSe7/MZH3nQWSqnN0/SkciMMLHEUTp61WGWeL/lFiepZlse/o9cmk0wFrPZJtQ+iCTkzK1WOsWY= X-Received: by 2002:a5d:5686:: with SMTP id f6mr27142180wrv.231.1574016971978; Sun, 17 Nov 2019 10:56:11 -0800 (PST) MIME-Version: 1.0 References: <20191117170418.C50D.27F6AC2D@kcn.ne.jp> In-Reply-To: From: Jim Meyering Date: Sun, 17 Nov 2019 10:55:59 -0800 Message-ID: Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp To: Paul Eggert Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 38223 Cc: Norihiro Tanaka , 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On Sun, Nov 17, 2019 at 8:28 AM Paul Eggert wrote: > Thanks for fixing that. Although the patch says "[Bug#38223 introduced in grep > 3.0]", the original bug report is against grep 2.28 and later. Can I take it > that we tried to fix the bug in 3.0 but the fix was incomplete? Thanks for noting that. I confirm that 2.10 through 2.27 are fine, and that this does afflict 2.28, but see it affected no other release until 3.0. Probably deserves more investigation. $ for i in grep-*; do echo $i: $(echo ab | LC_CTYPE=ja_JP.eucjp $i/bin/grep -Fw b); done|sed 's,.*-,,' 2.10: 2.11: 2.12: 2.13: 2.14: 2.15: 2.16: 2.17: 2.18: 2.19: 2.20: 2.21: 2.22: 2.23: 2.24: 2.25: 2.26: 2.27: 2.28: ab 2.3: 2.4: 2.4.1: 2.4.2: 2.5: 2.5.1: 2.5.3: 2.5.4: 2.6: 2.6.1: 2.6.2: 2.6.3: 2.7: 2.8: 2.9: 3.0: ab 3.1: ab 3.2: ab 3.3: ab From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 25 07:03:06 2019 Received: (at 38223) by debbugs.gnu.org; 25 Nov 2019 12:03:06 +0000 Received: from localhost ([127.0.0.1]:47706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZD58-00014c-7v for submit@debbugs.gnu.org; Mon, 25 Nov 2019 07:03:06 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]:52765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZD55-00012p-BO for 38223@debbugs.gnu.org; Mon, 25 Nov 2019 07:03:04 -0500 Received: by mail-wm1-f44.google.com with SMTP id l1so15150030wme.2 for <38223@debbugs.gnu.org>; Mon, 25 Nov 2019 04:03:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rOyxkFC2Zos6VsNYzVYMoRXmjLhcPs7j73PV+YesH2k=; b=gwNXpkuQO83CC9Qg1Nl6GOHkYsvF8mK01r1c49yplgrO3e6OSkIu1/41T6a4cNnSw0 UntXi12uPHF303vTNj1kYJqM4d0pG+hvVTDx1IhexrQzsOmg1VDpzxciII/fz5HutI2B 08jQQ7HzLoYe/uENqxp2LNYoAwciIeE96u28rgKsdcapz5DxMDVsV+K1bTRE515bc9RP 3N/Waz5m/+tcYeWlvEZi3Bf0799WVvX2rL892MZJy0c/fAO6ZIO7MfxnaYKrD+6ZcnRB 6UrA5WYvrivQhPHazIPrt/D3svSIrptIQGzPFGA5Iyo9MvDcR8K5BFr6B9xXOvKf+IoR YsKg== X-Gm-Message-State: APjAAAVbEUSsW05BfR1MvUG590BQumDiFOh1Snu0j8S5bsrBLAL+y0Ho uES3eDGh+Q4l6RMbHtmHxQMjUjrqaGtdsXiLhxObuA== X-Google-Smtp-Source: APXvYqz/7LoBqQ2pQ2oYXMK1GVq3wVMQZyhtRwjOZD018KW/0WIeSymltP9M/3Rs7CUlqO8zE4fE0BW0Beus1R8tDE0= X-Received: by 2002:a1c:99cb:: with SMTP id b194mr26232094wme.100.1574613801007; Sun, 24 Nov 2019 08:43:21 -0800 (PST) MIME-Version: 1.0 References: <20191117170418.C50D.27F6AC2D@kcn.ne.jp> In-Reply-To: From: Jim Meyering Date: Sun, 24 Nov 2019 08:43:08 -0800 Message-ID: Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp To: Paul Eggert Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Sun, Nov 17, 2019 at 10:55 AM Jim Meyering wrote: > > On Sun, Nov 17, 2019 at 8:28 AM Paul Eggert wrote: > > Thanks for fixing that. Although the patch says [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (meyering[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.8 DATE_IN_PAST_12_24 Date: is 12 to 24 hours before Received: date 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: meyering.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.44 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.44 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 38223 Cc: Norihiro Tanaka , 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) On Sun, Nov 17, 2019 at 10:55 AM Jim Meyering wrote: > > On Sun, Nov 17, 2019 at 8:28 AM Paul Eggert wrote: > > Thanks for fixing that. Although the patch says "[Bug#38223 introduced in grep > > 3.0]", the original bug report is against grep 2.28 and later. Can I take it > > that we tried to fix the bug in 3.0 but the fix was incomplete? > > Thanks for noting that. I confirm that 2.10 through 2.27 are fine, and > that this does afflict 2.28, but see it affected no other release > until 3.0. Probably deserves more investigation. > > $ for i in grep-*; do echo $i: $(echo ab | LC_CTYPE=ja_JP.eucjp > $i/bin/grep -Fw b); done|sed 's,.*-,,' I've corrected NEWS. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 30 17:42:49 2019 Received: (at 38223) by debbugs.gnu.org; 30 Nov 2019 22:42:49 +0000 Received: from localhost ([127.0.0.1]:35302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibBRx-00070h-Ab for submit@debbugs.gnu.org; Sat, 30 Nov 2019 17:42:49 -0500 Received: from mail-wr1-f50.google.com ([209.85.221.50]:33608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibBRv-00070V-M1 for 38223@debbugs.gnu.org; Sat, 30 Nov 2019 17:42:48 -0500 Received: by mail-wr1-f50.google.com with SMTP id b6so9715607wrq.0 for <38223@debbugs.gnu.org>; Sat, 30 Nov 2019 14:42:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mVEYL7t4WnDSfQmja9tUBmZTV8Jfu4BxB2ioMjjMpNM=; b=OvESE/PjVYwa+VzGIpm0h/gpkoaL9qoClRBpWzo4BHh/KsoxyNbOPyPo43OOE9GSjW f25tN0FqZx2G5BmOxdLWnDXKbJ3CHOaNO3/U/QZ8yBkl/GxfZR3tUXIcTOE+uK/vXOMk XrD8ow9EKQiw15DZRllgNsr0KSw6oYdd4iJxSAZCjpF9UovC9+zzEqlQZuqTWFf4tJsd SSpC6tBoazMIuGYUMNtQnD13Zrr/IP7BDkqFX0MlrC0flwFMUHSAFMMXHun3Z7LxfWlW kTAWd3+Qft6ZR4YAkkpdtMaQmogzsDn5fYezRtrJmdNosLA/IrEgqxyUAGF3oMl+o4sr Mccw== X-Gm-Message-State: APjAAAUFUBvmQ/ipDkOMbIUCdb7M/IzhRvsslEHjJkzu63tQqNP3uwaj SjUDn4+CvG/ReOiPIRfaXcWPen5b+5yT0UrL9QFdCrc3CEo= X-Google-Smtp-Source: APXvYqy8l6RmxkxXOEAmqOH3Y4e0+oT41tudgSUI5y19/iJY/yiRV06uvNsF36+p6MYN9iQ5VSdt/ZuJFiff4lJhOLQ= X-Received: by 2002:adf:f288:: with SMTP id k8mr50656010wro.301.1575153761659; Sat, 30 Nov 2019 14:42:41 -0800 (PST) MIME-Version: 1.0 References: <20191117090007.C509.27F6AC2D@kcn.ne.jp> In-Reply-To: From: Jim Meyering Date: Sun, 1 Dec 2019 06:42:29 +0800 Message-ID: Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp To: Norihiro Tanaka Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38223 Cc: 38223@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Sun, Nov 17, 2019 at 2:45 PM Jim Meyering wrote: > > On Sat, Nov 16, 2019 at 8:36 PM Jim Meyering wrote: > > On Sat, Nov 16, 2019 at 4:02 PM Norihiro Tanaka wrote: > > > On Sat, 16 Nov 2019 11:00:38 -0800 > > > Jim Meyering wrote: > > > > > > > I've pushed the complete fix here: > > > > https://git.savannah.gnu.org/cgit/grep.git/commit/?id=090a4dbe03951e427f03f83be424caacc3303799 > > > > > > > > I've also fixed the comment and a variable name and updated gnulib to latest. > > > > > > After patched, I found extreamly slowdown. > > > > > > yes $(printf %040d 0) | head -1000000 >k > > > time -p env LC_ALL=ja_JP.eucjp src/grep -F -w 0 k > > > > > > First patch fixes it, and second improves performance more. > > > > Nice. Thank you! > > Those look fine, at first glance, modulo these minor changes that I > > expect to merge into the latter: > > Thanks again, Norihiro Tanaka. > I have also adjusted commit log wording and added comments for the new > mbclen parameter. I've attached the two commits that I expect to push > tomorrow, assuming no objection. That performance regression deserved a test suite addition, so I've done this: tests: add test that would have detected -Fw perf regression * tests/mb-non-UTF8-perf-Fw: New file. Detect v3.3-22-g090a4db's performance regression. * tests/Makefile.am (TESTS): Add it. Pushed as https://git.sv.gnu.org/cgit/grep.git/commit/?id=fdd45db167c9e5 From unknown Wed Jun 18 23:17:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 29 Dec 2019 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator