+2020-12-11 Bruno Haible <bruno@clisp.org>
+
+ memchr: Work around memory overrun bug on AIX 7.2.
+ * m4/memchr.m4 (gl_FUNC_MEMCHR): Test against AIX 7.2 bug.
+ * doc/posix-functions/memchr.texi: Mention the AIX bug.
+
2020-12-11 Bruno Haible <bruno@clisp.org>
execute-tests: Fix compilation error on AIX in 32-bit mode.
@itemize
@item
This function dereferences too much memory on some platforms:
-glibc 2.10 on x86_64, IA-64; glibc 2.11 on Alpha.
+glibc 2.10 on x86_64, IA-64; glibc 2.11 on Alpha, AIX 7.2.
@item
This function returns NULL if the character argument is not in the range
of an @code{unsigned char} on some platforms:
-# memchr.m4 serial 16
+# memchr.m4 serial 17
dnl Copyright (C) 2002-2004, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
#endif
if (fence)
{
+ /* Test against bugs on glibc systems. */
if (memchr (fence, 0, 0))
result |= 1;
strcpy (fence - 9, "12345678");
result |= 2;
if (memchr (fence - 1, 0, 3) != fence - 1)
result |= 4;
+ /* Test against bug on AIX 7.2. */
+ if (memchr (fence - 4, '6', 16) != fence - 4)
+ result |= 8;
}
/* Test against bug on Android 4.3. */
{
input[1] = 'b';
input[2] = 'c';
if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
- result |= 8;
+ result |= 16;
}
return result;
]])],