[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Grep-devel] regex and grep severely broken on HP-UX
From: |
Bruno Haible |
Subject: |
Re: [Grep-devel] regex and grep severely broken on HP-UX |
Date: |
Mon, 17 Dec 2018 04:31:09 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-139-generic; KDE/5.18.0; x86_64; ; ) |
Hi Paul,
> Some HP-UX versions have a broken 'calloc' that could explain the bug. The
> broken 'calloc' returns memory that isn't properly zeroed. Can you
> investigate
> whether zeroing the calloc memory fixes the bug? Perhaps something like the
> attached Gnulib patch?
This patch does not help: Even with it, test-regex still crashes in the
same way:
Assertion failed: err == REG_ESPACE, file ../../gllib/regexec.c, line 1077
FAIL test-regex (exit status: 134)
But I found GCC binaries that I can use on this machine, and with this GCC,
both the test-regex and all 'grep' tests pass!
Out of the four hypotheses
(a) Unportable #if code that expands to invalid code for HP-UX cc.
(b) A HP-UX cc front-end bug.
(c) A HP-UX cc optimization bug.
(d) A HP-UX cc code generation bug.
we can exclude (c) - since I had no optimization options enabled -,
and (a) is unlikely as well - since it would likely have affected the
compilation on HP-UX ia64 as well.
Conclusion: Either (b) or (d).
Bruno