From 4b53081b2fc3f5ff719b9ae0c49cee1c12f0e9cb Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 1 Jun 2020 12:45:13 +0000 Subject: * configure.in: Add --enable-thread-debug, which defines APR_THREAD_DEBUG. * locks/unix/thread_mutex.c (apr_thread_mutex_create): For APR_THREAD_DEBUG, use the ERRORCHECK mutex type by default (if not nested/recursive), which reliably fails for cases of otherwise undefined behaviour: a) relocking a mutex locked by the current thread b) unlocking a thread locked by another thread git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1878362 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 47f0d0b26..937bc22ba 100644 --- a/configure.in +++ b/configure.in @@ -435,6 +435,13 @@ AC_ARG_ENABLE(pool-debug, fi ]) +AC_ARG_ENABLE(thread-debug, + [ --enable-thread-debug Turn on run-time thread debugging tests], + [ if test $enableval = yes; then + APR_ADDTO(CPPFLAGS, [-DAPR_THREAD_DEBUG=1]) + fi + ]) + if test "$host" = "i586-pc-beos"; then AC_ARG_ENABLE(malloc-debug,[ --enable-malloc-debug Switch on malloc_debug for BeOS], APR_REMOVEFROM(CFLAGS, -O2) -- cgit v1.2.1