[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Internal error in gawk-3.1.3 with character class
From: |
Michael Mauch |
Subject: |
Internal error in gawk-3.1.3 with character class |
Date: |
Sun, 7 Sep 2003 23:11:51 +0200 |
User-agent: |
Mutt/1.4.1i |
Hi Arnold,
I just stumbled across a problem in gawk 3.1.3 and 3.1.2 (3.1.1 is
fine):
LC_ALL=en_US gawk -v IGNORECASE=1 '
BEGIN { if("a" ~ /[[:alnum:]]/) print "Ok" }'
gawk: cmd. line:1: fatal error: internal error
With LC_ALL=C it's ok, but with any other locale it breaks.
I'm running Linux with glibc-2.1.3, but it's the same with glibc-2.3.2.
I configured gawk without any options. With --disable-nls, the error
does not occur.
I disabled the signal handlers and got in gdb:
Program received signal SIGSEGV, Segmentation fault.
0x0807504f in build_charclass (trans=0x808f4a0 "", sbcset=0x80ac8d8,
mbcset=0x80ac900, char_class_alloc=0xbfffdfb8, class_name=0xbfffdf78 "alpha",
syntax=1290317) at regcomp.c:3268
(gdb)
I don't know whether "trans" is supposed to ever be the empty string,
but when it is, the BUILD_CHARCLASS_LOOP macro breaks:
#define BUILD_CHARCLASS_LOOP(ctype_func)\
for (i = 0; i < SBC_MAX; ++i) \
{ \
if (ctype_func (i)) \
{ \
int ch = trans ? trans[i] : i; \
bitset_set (sbcset, ch); \
} \
}
Regards...
Michael
- Internal error in gawk-3.1.3 with character class,
Michael Mauch <=