+2013-12-03 Eric Blake <eblake@redhat.com>
+
+ regex: avoid glibc deadlock during configure
+ * m4/regex.m4 (gl_REGEX): Avoid recursive malloc deadlock when
+ glibc bug 15078 in turn triggers bug 16159.
+ Reported by Michal Privoznik.
+
2013-12-02 Pádraig Brady <P@draigBrady.com>
md5, sha1, sha256, sha512: use openssl routines if available.
-# serial 64
+# serial 65
# Copyright (C) 1996-2001, 2003-2013 Free Software Foundation, Inc.
#
# If cross compiling, assume the test would fail and use the included
# regex.c.
AC_CHECK_DECLS_ONCE([alarm])
+ AC_CHECK_HEADERS_ONCE([malloc.h])
AC_CACHE_CHECK([for working re_compile_pattern],
[gl_cv_func_re_compile_pattern_working],
[AC_RUN_IFELSE(
# include <unistd.h>
# include <signal.h>
#endif
+ #if HAVE_MALLOC_H
+ # include <malloc.h>
+ #endif
]],
[[int result = 0;
static struct re_pattern_buffer regex;
const char *s;
struct re_registers regs;
+ /* Some builds of glibc go into an infinite loop on this
+ test. Use alarm to force death, and mallopt to avoid
+ malloc recursion in diagnosing the corrupted heap. */
#if HAVE_DECL_ALARM
- /* Some builds of glibc go into an infinite loop on this test. */
signal (SIGALRM, SIG_DFL);
alarm (2);
#endif
+#ifdef M_CHECK_ACTION
+ mallopt(M_CHECK_ACTION, 2);
+#endif
+
if (setlocale (LC_ALL, "en_US.UTF-8"))
{
{