bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

regex test failure on HP-UX/hppa


From: Bruno Haible
Subject: regex test failure on HP-UX/hppa
Date: Sat, 12 Oct 2019 12:48:21 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-165-generic; KDE/5.18.0; x86_64; ; )

Hi,

With the regex module as of yesterday (before the
'Simplify and regularize regex use of ‘assert’' change) I see test
failures on HP-UX/hppa. Namely:

HP-UX cc on hppa, both 32-bit and 64-bit, even without any optimization:
(works with gcc, works with HP-UX cc on ia64)

$ ./test-regex 
Assertion failed: err == REG_ESPACE, file ../../gllib/regexec.c, line 1068
ABORT instruction (core dumped)

Four of the test cases produce this error. Here are the respective stack
traces:

(gdb) where
#0  0x6ffb0780 in kill+0x10 () from /usr/lib/libc.2
#1  0x6ff42334 in raise+0x84 () from /usr/lib/libc.2
#2  0x6ff98a10 in abort_C+0x160 () from /usr/lib/libc.2
#3  0x6ff98a6c in abort+0x1c () from /usr/lib/libc.2
#4  0x6ff31f68 in _assert+0x178 () from /usr/lib/libc.2
#5  0x13440 in check_matching (mctx=0x6fff0810, fl_longest_match=true, 
p_match_first=0x6fff07fc) at ../../gllib/regexec.c:1068
#6  0x12aa0 in re_search_internal (preg=0x40001f40, string=0x1b250 "a\nb", 
length=3, start=0, last_start=3, stop=3, nmatch=1, 
    pmatch=0x400064a0, eflags=0) at ../../gllib/regexec.c:794
#7  0x11e38 in re_search_stub (bufp=0x40001f40, string=0x1b250 "a\nb", 
length=3, start=0, range=3, stop=3, regs=0x6fff06a8, ret_len=false)
    at ../../gllib/regexec.c:425
#8  0x1183c in rpl_re_search (bufp=0x40001f40, string=0x1b250 "a\nb", length=3, 
start=0, range=3, regs=0x6fff06a8)
    at ../../gllib/regexec.c:289
#9  0x3c2c in main () at ../../gltests/test-regex.c:132

(gdb) where
#0  0x6ffb0780 in kill+0x10 () from /usr/lib/libc.2
#1  0x6ff42334 in raise+0x84 () from /usr/lib/libc.2
#2  0x6ff98a10 in abort_C+0x160 () from /usr/lib/libc.2
#3  0x6ff98a6c in abort+0x1c () from /usr/lib/libc.2
#4  0x6ff31f68 in _assert+0x178 () from /usr/lib/libc.2
#5  0x1333c in check_matching (mctx=0x6fff0810, fl_longest_match=true, 
p_match_first=0x6fff07fc) at ../../gllib/regexec.c:1068
#6  0x1299c in re_search_internal (preg=0x40001f40, string=0x1b168 "an", 
length=2, start=0, last_start=0, stop=2, nmatch=1, 
    pmatch=0x400064d0, eflags=0) at ../../gllib/regexec.c:794
#7  0x11d34 in re_search_stub (bufp=0x40001f40, string=0x1b168 "an", length=2, 
start=0, range=0, stop=2, regs=0x6fff06a8, ret_len=true)
    at ../../gllib/regexec.c:425
#8  0x116d0 in rpl_re_match (bufp=0x40001f40, string=0x1b168 "an", length=2, 
start=0, regs=0x6fff06a8) at ../../gllib/regexec.c:279
#9  0x3dd0 in main () at ../../gltests/test-regex.c:183

(gdb) where
#0  0x6ffb0780 in kill+0x10 () from /usr/lib/libc.2
#1  0x6ff42334 in raise+0x84 () from /usr/lib/libc.2
#2  0x6ff98a10 in abort_C+0x160 () from /usr/lib/libc.2
#3  0x6ff98a6c in abort+0x1c () from /usr/lib/libc.2
#4  0x6ff31f68 in _assert+0x178 () from /usr/lib/libc.2
#5  0x13254 in check_matching (mctx=0x6fff0810, fl_longest_match=true, 
p_match_first=0x0) at ../../gllib/regexec.c:1068
#6  0x128b4 in re_search_internal (preg=0x40001f40, string=0x1b080 "wxy", 
length=3, start=2, last_start=0, stop=3, nmatch=1, 
    pmatch=0x40006418, eflags=0) at ../../gllib/regexec.c:794
#7  0x11c4c in re_search_stub (bufp=0x40001f40, string=0x1b080 "wxy", length=3, 
start=2, range=-2, stop=3, regs=0x6fff06a8, ret_len=false)
    at ../../gllib/regexec.c:425
#8  0x11650 in rpl_re_search (bufp=0x40001f40, string=0x1b080 "wxy", length=3, 
start=2, range=-2, regs=0x6fff06a8)
    at ../../gllib/regexec.c:289
#9  0x3dd8 in main () at ../../gltests/test-regex.c:198

(gdb) where
#0  0x6ffb0780 in kill+0x10 () from /usr/lib/libc.2
#1  0x6ff42334 in raise+0x84 () from /usr/lib/libc.2
#2  0x6ff98a10 in abort_C+0x160 () from /usr/lib/libc.2
#3  0x6ff98a6c in abort+0x1c () from /usr/lib/libc.2
#4  0x6ff31f68 in _assert+0x178 () from /usr/lib/libc.2
#5  0x13164 in check_matching (mctx=0x6fff0810, fl_longest_match=true, 
p_match_first=0x6fff07fc) at ../../gllib/regexec.c:1068
#6  0x127c4 in re_search_internal (preg=0x40001f40, string=0x1af90 "WXY", 
length=3, start=0, last_start=3, stop=3, nmatch=1, 
    pmatch=0x40006418, eflags=0) at ../../gllib/regexec.c:794
#7  0x11b5c in re_search_stub (bufp=0x40001f40, string=0x1af90 "WXY", length=3, 
start=0, range=3, stop=3, regs=0x6fff06a8, ret_len=false)
    at ../../gllib/regexec.c:425
#8  0x11560 in rpl_re_search (bufp=0x40001f40, string=0x1af90 "WXY", length=3, 
start=0, range=3, regs=0x6fff06a8)
    at ../../gllib/regexec.c:289
#9  0x3de8 in main () at ../../gltests/test-regex.c:215

Paul, if you understand it, the better.
I am not going to pursue this further, since HP-UX/hppa, while not being
end-of-life yet [1], has very little relevance for GNU.

But what I find strange / buggy is that a library function calls
assert and abort().

Bruno

[1] https://en.wikipedia.org/wiki/HP-UX#Version_history[7]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]