Re: ptrdiff_t overflow checks for malloc-posix etc.

2021-05-09 Thread Bruno Haible
> 2021-05-09 Bruno Haible > > {malloc,realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18). Even after this is fixed, I see a test failure (building the newest m4) on AIX in 64-bit mode: test-calloc-gnu fails with exit code 1. Looking at the details: The configure output has

Re: ptrdiff_t overflow checks for malloc-posix etc.

2021-05-09 Thread Bruno Haible
Hi Paul, On 2021-04-18 you replied: > > if test $REPLACE_REALLOC = 0; then > > _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=1]) > > fi > > I confess I don't like the style as much: it makes the shell code a bit > less readable, at least to me. But it appears that this style isn't > needed a

Re: ptrdiff_t overflow checks for malloc-posix etc.

2021-05-09 Thread Bruno Haible
Paul Eggert wrote: > I installed the attached patches into Gnulib to make its malloc > replacements ptrdiff_t safe. When testing m4-1.4.18b on IRIX 6.5, I get a test failure: FAIL: test-reallocarray Let's look in detail: $ ./test-reallocarray ; echo $? 2 There is a call p = realloc (NULL, 2

getrandom: Fail with ENOSYS when the system has no randomness source

2021-05-09 Thread Bruno Haible
On IRIX 6.5, 'test-getrandom' fails: $ ./test-getrandom ../../tests/test-getrandom.c:43: assertion 'errno == ENOSYS' failed The glibc documentation says that when "The operating system does not implement a randomness s

free tests: Avoid test failure on glibc < 2.15

2021-05-09 Thread Bruno Haible
When building m4-1.4.18b on a glibc 2.13 system, there is a test failure: test-free: malloc.c:3551: munmap_chunk: Assertion `ret == 0' failed. Aborted This is an internal assertion that was fixed in glibc ([BZ #13276]) on 2011-10-29, that is, before glibc 2.15. Let's avoid this failure, since we

Fix build error when libintl is installed

2021-05-09 Thread Bruno Haible
When building m4-1.4.18b on OpenBSD 6.9, with GNU gettext installed, there is a link error: CCLD test-posix_spawn-chdir ld: error: undefined symbol: libintl_gettext >>> referenced by xalloc-die.c:34 (../../lib/xalloc-die.c:34) >>> xalloc-die.o:(xalloc_die) in archive ../lib/lib

Re: Bug in test-fcntl.c

2021-05-09 Thread Bruno Haible
Nicholas Gaya wrote: > it seems like the test process inherits a lot of open files from its parent, > as the actual fd returned by fcntl is 67. That seems excessive. What is the chain of parent, grandparent etc. processes? Bruno