|
From: | Jaromir Obr |
Subject: | Re: [bug-gawk] Segfault when using higher ascii range in regexp |
Date: | Sun, 29 May 2016 19:45:13 +0200 |
Hi,
On Sat, May 28, 2016 at 09:58:03PM +0200, Jaromir Obr wrote:
> steps to reproduce:
>
> $ printf "a"|awk '/[\x80-\x81]/ {count++}; END {print count}'
> awk: cmd. line:1: fatal error: internal error: segfault
> Aborted (core dumped)
>
> or simply:
> $ printf "a"|awk '/[\x7f-\x80]/'
> awk: cmd. line:1: fatal error: internal error: segfault
> Aborted (core dumped)
I believe this issue has already been fixed:
bash-4.2$ gawk --version | head -1
GNU Awk 4.1.3f, API: 1.1 (GNU MPFR 3.1.1, GNU MP 5.1.1)
bash-4.2$ printf "a" | ./gawk '/[\x7f-\x80]/'
bash-4.2$
Unfortunately, a new version with this fix has not yet been
released, and I cannot easily find the relevant patch.
For the time being, you could grab a development version from
the git repository:
https://www.gnu.org/software/gawk/manual/html_node/Accessing-The-Source.html
Something like (off the top of my head):
git clone git://git.savannah.gnu.org/gawk.git gawk
cd gawk
git checkout gawk-4.1-stable
./bootstrap.sh && ./configure && make && make check && make install
Regards,
Andy
[Prev in Thread] | Current Thread | [Next in Thread] |