summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-03-18 04:25:50 (GMT)
committerGitHub <noreply@github.com>2023-03-18 04:25:50 (GMT)
commit084247f1cd3bf09df5dd49de3de1874768caaf9f (patch)
tree11c8aff1d73d8f1db07d5919ff75335a206e17bb
parent45f13f1de1b6db0fdc34681b4b8046fa46f921ba (diff)
downloadhdf5-084247f1cd3bf09df5dd49de3de1874768caaf9f.zip
hdf5-084247f1cd3bf09df5dd49de3de1874768caaf9f.tar.gz
hdf5-084247f1cd3bf09df5dd49de3de1874768caaf9f.tar.bz2
Removes dmalloc support (#2239) (#2587)
This has not been used to debug the library in a very long time. Most developers use valgrind, -fsanitize=address, or some other memory checker instead of this library. This removes: * dmalloc.h include from H5private.h * --with-dmalloc= Autotools configure option * HDF5_ENABLE_USING_DMALLOC CMake option
-rw-r--r--CMakeLists.txt9
-rw-r--r--config/cmake/H5pubconf.h.in6
-rw-r--r--config/cmake/libhdf5.settings.cmake.in1
-rw-r--r--configure.ac76
-rw-r--r--release_docs/RELEASE.txt15
-rw-r--r--src/H5private.h7
-rw-r--r--src/libhdf5.settings.in1
7 files changed, 14 insertions, 101 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eee74cc..f9b83de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -573,15 +573,6 @@ if (HDF5_ENABLE_COVERAGE)
endif ()
#-----------------------------------------------------------------------------
-# Option to indicate using dmalloc
-#-----------------------------------------------------------------------------
-# option (HDF5_ENABLE_USING_DMALLOC "Indicate that dmalloc is used" OFF)
-# if (HDF5_ENABLE_USING_DMALLOC)
-# find_package (DMALLOC)
-# set (H5_HAVE_DMALLOC DMALLOC_FOUND)
-# endif ()
-
-#-----------------------------------------------------------------------------
# Option to indicate using a memory checker
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF)
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 1506830..12e7f95 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -132,9 +132,6 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine H5_HAVE_DLFCN_H @H5_HAVE_DLFCN_H@
-/* Define to 1 if you have the <dmalloc.h> header file. */
-#cmakedefine H5_HAVE_DMALLOC_H @H5_HAVE_DMALLOC_H@
-
/* Define if library information should be embedded in the executables */
#cmakedefine H5_HAVE_EMBEDDED_LIBINFO @H5_HAVE_EMBEDDED_LIBINFO@
@@ -220,9 +217,6 @@
/* Define to 1 if you have the `dl' library (-ldl). */
#cmakedefine H5_HAVE_LIBDL @H5_HAVE_LIBDL@
-/* Define to 1 if you have the `dmalloc' library (-ldmalloc). */
-#cmakedefine H5_HAVE_LIBDMALLOC @H5_HAVE_LIBDMALLOC@
-
/* Proceed to build with libhdfs */
#cmakedefine H5_HAVE_LIBHDFS @H5_HAVE_LIBHDFS@
diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in
index eb83c3a..20a750e 100644
--- a/config/cmake/libhdf5.settings.cmake.in
+++ b/config/cmake/libhdf5.settings.cmake.in
@@ -80,7 +80,6 @@ Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@
Mirror VFD: @H5_HAVE_MIRROR_VFD@
(Read-Only) S3 VFD: @H5_HAVE_ROS3_VFD@
(Read-Only) HDFS VFD: @H5_HAVE_LIBHDFS@
- dmalloc: @H5_HAVE_LIBDMALLOC@
Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@
API Tracing: @HDF5_ENABLE_TRACE@
Using memory checker: @HDF5_ENABLE_USING_MEMCHECKER@
diff --git a/configure.ac b/configure.ac
index a74bddc..1093812 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1560,82 +1560,6 @@ AC_ARG_WITH([fnord],
])
## ----------------------------------------------------------------------
-## Is dmalloc (debug malloc library) requested? It has a header file
-## `dmalloc.h' and a library `-ldmalloc' and their locations might be
-## specified with the `--with-dmalloc' command-line switch. The value
-## is an include path and/or a library path. If the library path is
-## specified then it must be preceded by a comma.
-##
-AC_SUBST([HAVE_DMALLOC])
-
-## Default is not present
-HAVE_DMALLOC=no
-
-AC_ARG_WITH([dmalloc],
- [AS_HELP_STRING([--with-dmalloc=DIR],
- [Use dmalloc memory debugging aid [default=no]])],,
- [withval=no])
-
-case "X-$withval" in
- X-yes)
- HAVE_DMALLOC="yes"
- AC_CHECK_HEADERS([dmalloc.h],, [unset HAVE_DMALLOC])
- if test "x$HAVE_DMALLOC" = "xyes"; then
- AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [unset HAVE_DMALLOC])
- fi
- if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then
- AC_MSG_ERROR([couldn't find dmalloc library])
- fi
- ;;
- X-|X-no|X-none)
- HAVE_DMALLOC="no"
- AC_MSG_CHECKING([for dmalloc library])
- AC_MSG_RESULT([suppressed])
- ;;
- *)
- HAVE_DMALLOC="yes"
- case "$withval" in
- *,*)
- dmalloc_inc="`echo $withval |cut -f1 -d,`"
- dmalloc_lib="`echo $withval |cut -f2 -d, -s`"
- ;;
- *)
- if test -n "$withval"; then
- dmalloc_inc="$withval/include"
- dmalloc_lib="$withval/lib"
- fi
- ;;
- esac
-
- saved_CPPFLAGS="$CPPFLAGS"
- saved_AM_CPPFLAGS="$AM_CPPFLAGS"
- saved_LDFLAGS="$LDFLAGS"
- saved_AM_LDFLAGS="$AM_LDFLAGS"
-
- if test -n "$dmalloc_inc"; then
- CPPFLAGS="$CPPFLAGS -I$dmalloc_inc"
- AM_CPPFLAGS="$AM_CPPFLAGS -I$dmalloc_inc"
- fi
-
- AC_CHECK_HEADERS([dmalloc.h],,[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_DMALLOC])
-
- if test "x$HAVE_DMALLOC" = "xyes"; then
- if test -n "$dmalloc_lib"; then
- LDFLAGS="$LDFLAGS -L$dmalloc_lib"
- AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib"
- fi
-
- AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC])
- fi
-
- if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then
- AC_MSG_ERROR([couldn't find dmalloc library])
- fi
- ;;
-esac
-
-
-## ----------------------------------------------------------------------
## Make the external filters list available to *.in files
## At this point it's unset (no external filters by default) but it
## will be filled in during the deflate (zlib) and szip processing
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 688116d..9263a63 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -49,6 +49,19 @@ New Features
Configuration:
-------------
+ - Removal of dmalloc support
+
+ The ability to build with dmalloc support has been removed along with
+ the following configure options:
+
+ Autotools:
+ --with-dmalloc=
+
+ CMake:
+ HDF5_ENABLE_USING_DMALLOC
+
+ (DER - 2023/03/17)
+
- Allow parallel and threadsafe to be built
In the past, we required --enable-unsupported (Autotools) or
@@ -59,7 +72,7 @@ New Features
(DER - 2023/03/17)
- Added new option to build libaec and zlib inline with CMake.
-
+
Using the CMake FetchContent module, the external filters can populate
content at configure time via any method supported by the ExternalProject
module. Whereas ExternalProject_Add() downloads at build time, the
diff --git a/src/H5private.h b/src/H5private.h
index 3525e2b..47132a0 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -227,13 +227,6 @@
#endif /* H5_HAVE_MPE */
/*
- * dmalloc (debugging malloc) support
- */
-#ifdef H5_HAVE_DMALLOC_H
-#include "dmalloc.h"
-#endif /* H5_HAVE_DMALLOC_H */
-
-/*
* NT doesn't define SIGBUS, but since NT only runs on processors
* that do not have alignment constraints a SIGBUS would never be
* raised, so we just replace it with SIGILL (which also should
diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in
index 128e107..bcf307b 100644
--- a/src/libhdf5.settings.in
+++ b/src/libhdf5.settings.in
@@ -82,7 +82,6 @@ Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@
Mirror VFD: @MIRROR_VFD@
(Read-Only) S3 VFD: @ROS3_VFD@
(Read-Only) HDFS VFD: @HAVE_LIBHDFS@
- dmalloc: @HAVE_DMALLOC@
Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@
API tracing: @TRACE_API@
Using memory checker: @USINGMEMCHECKER@