Re: [Grep-devel] regex and grep severely broken on HP-UX

2018-12-16 Thread Bruno Haible
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 h

Re: [Grep-devel] regex and grep severely broken on HP-UX

2018-12-16 Thread Paul Eggert
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? Thanks. diff --git a/lib/calloc.c b/lib/cal

Re: OpenBSD locale system

2018-12-16 Thread Ingo Schwarze
Hi Bruno, Bruno Haible wrote on Sun, Dec 16, 2018 at 08:01:04PM +0100: > Ingo Schwarze wrote: >> The OpenBSD C library intentionally doesn't implement any other >> locale(1) categories except LC_CTYPE because many here regard the >> other categories as overengineering and as detrimental to system

Re: grep-3.1.46-504af on Minix

2018-12-16 Thread Bruno Haible
On Minix 3.3, several tests fail: * stackoverflow - this is expected, because Minix does not have the necessary support for libsigsegv. * include-exclude, rdot, symlink, word-multi-file - apparently "grep -r DIRECTORY" produces an "Invalid argument" error. A couple of gnulib tests fail as w

Re: c-stack: Fix for Linux/sparc

2018-12-16 Thread Jim Meyering
On Sun, Dec 16, 2018 at 2:38 PM Bruno Haible wrote: > While testing a 'grep' snapshot on Linux/sparc64, I noticed that this > test failure (both in 32-bit and 64-bit mode): > > FAIL: test-c-stack2.sh > == > > cannot tell stack overflow from crash, in spite of libsigsegv > FAIL

c-stack: Fix for Linux/sparc

2018-12-16 Thread Bruno Haible
While testing a 'grep' snapshot on Linux/sparc64, I noticed that this test failure (both in 32-bit and 64-bit mode): FAIL: test-c-stack2.sh == cannot tell stack overflow from crash, in spite of libsigsegv FAIL test-c-stack2.sh (exit status: 1) The message "in spite of libsi

localename: Avoid test failure on some glibc systems

2018-12-16 Thread Bruno Haible
While testing a 'grep' snapshot, I was seeing 'test-localename' failures on a few systems. The cause / conditions are rather particular: - I'm working in an environment where all LC_* variables are set to 'de_DE.UTF-8'. - When I log in through a remote machine through ssh, the LC_* and LANG

Re: [Grep-devel] regex and grep severely broken on HP-UX

2018-12-16 Thread Jim Meyering
On Sun, Dec 16, 2018 at 11:34 AM Bruno Haible wrote: > > So grep worked on HP-UX before because it was using the system regex code? > > I don't know. Maybe GNU grep never worked on HP-UX hppa? Or maybe it worked > only when compiled by gcc? Or maybe the machine I have access to has a > particularl

Re: [Grep-devel] regex and grep severely broken on HP-UX

2018-12-16 Thread Bruno Haible
Hi Jim, > So grep worked on HP-UX before because it was using the system regex code? I don't know. Maybe GNU grep never worked on HP-UX hppa? Or maybe it worked only when compiled by gcc? Or maybe the machine I have access to has a particularly buggy cc compiler? Or maybe GNU grep worked as long

Re: [Grep-devel] regex and grep severely broken on HP-UX

2018-12-16 Thread Jim Meyering
> Version Result > - > 20140101crash in regexec.c, line 1123 > 20150101crash in regexec.c, line 1123 > 20160101crash in regexec.c, line 1123 > 20170101crash in regexec.c, line 1104 > 20180101 crash in regexec.c, line 1073 > 20181216crash in regexec.c,

Re: OpenBSD locale system

2018-12-16 Thread Bruno Haible
Hi Ingo, > The OpenBSD C library intentionally doesn't implement any other > locale(1) categories except LC_CTYPE because many here regard the > other categories as overengineering and as detrimental to system > security I partially agree with this, regarding specific categories, such as - LC_

Re: localename: Fix test failure on OpenBSD >= 6.2

2018-12-16 Thread Ingo Schwarze
Hi Bruno, Bruno Haible wrote on Sun, Dec 16, 2018 at 07:12:44AM +0100: > While testing a grep snapshot on OpenBSD 6.3, I see a test failure of > test-localename. The cause is that in OpenBSD >= 6.2, the locale_t > type and uselocale() etc. are now available, but with a terribly dumbed- > down imp

Re: regex and grep severely broken on HP-UX

2018-12-16 Thread Bruno Haible
in regexec.c, line 1123 20160101crash in regexec.c, line 1123 20170101crash in regexec.c, line 1104 20180101crash in regexec.c, line 1073 20181216crash in regexec.c, line 1077 (even with today's fix by Assaf+Paul) Bruno

Re: random module linking problem on mingw ?

2018-12-16 Thread Bruno Haible
Hi Assaf, > The attached patch works for me on mingw, Thanks for the investigation. For me, with a gnulib testdir created through ./gnulib-tool --create-testdir --dir=../testdir1 --single-configure random I still get a link error in test-random. "nm" shows why: random.o defines __initstate and

Re: [PATCH] mkdir-p: Don't discard stat error

2018-12-16 Thread Niklas Hambüchen
On 15/12/2018 1:27 AM, Paul Eggert wrote: + if (stat (dir + prefix_len, &st) == 0 + && S_ISDIR (st.st_mode)) That patch doesn't look quite right, since it can use errno even when stat succeeded (in which case errno contains garbage). Oops, you're right,

Re: regex and grep severely broken on HP-UX

2018-12-16 Thread Bruno Haible
More on this: > On HP-UX 11.31, hppa, in 32-bit mode, with cc, I observe the following > test failures: On HP-UX hppa (both 32-bit and 64-bit mode), regex and grep are broken. On HP-UX ia64 (both 32-bit and 64-bit mode), regex and grep both work fine. Bruno

regex and grep severely broken on HP-UX

2018-12-16 Thread Bruno Haible
On HP-UX 11.31, hppa, in 32-bit mode, with cc, I observe the following test failures: 1) Among the gnulib tests (both from the 'grep' snapshot, as well as from a gnulib testdir): FAIL: test-regex $ ./test-regex Assertion failed: err == REG_ESPACE, file ../../lib/regexec.c, line 1077 ABORT instr

obstack, libc-config: Support HP-UX cc in C99 mode

2018-12-16 Thread Bruno Haible
Testing a 'grep' snapshot on HP-UX 11.31 hppa, in 32-bit mode, with cc (as I don't have a gcc on that machine), more precisely CC="cc -AC99 -D_XOPEN_SOURCE=500", I get this compilation error: CC obstack.o cc: "../../lib/obstack.h", line 175: error 1687: Illegal use of flexible array: stru