Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable memory alloc sanity checks by default for Autotools debug builds #1468

Merged
merged 1 commit into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2710,9 +2710,11 @@ AC_ARG_ENABLE([memory-alloc-sanity-check],
[Enable this option to turn on internal memory
allocation sanity checking. This could cause
more memory use and somewhat slower allocation.
This option is orthogonal to the
--enable-using-memchecker option.
[default=yes if debug build, otherwise no]
This option may also cause issues with HDF5
filter plugins, so should not be enabled if
filters are to be used. This option is orthogonal
to the --enable-using-memchecker option.
[default=no]
])],
[MEMORYALLOCSANITYCHECK=$enableval])

Expand All @@ -2722,11 +2724,10 @@ AC_SUBST([MEMORYALLOCSANITYCHECK])

## Set default
if test "X-$MEMORYALLOCSANITYCHECK" = X- ; then
if test "X-$BUILD_MODE" = "X-debug" ; then
MEMORYALLOCSANITYCHECK=yes
else
MEMORYALLOCSANITYCHECK=no
fi
# Should consider enabling this option by default for
# 'developer' builds if that build mode is added in
# the future
MEMORYALLOCSANITYCHECK=no
fi

case "X-$MEMORYALLOCSANITYCHECK" in
Expand Down
19 changes: 19 additions & 0 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,25 @@ New Features

Configuration:
-------------
- HDF5 memory allocation sanity checking is now off by default for
Autotools debug builds

HDF5 can be configured to perform sanity checking on internal memory
allocations by adding heap canaries to these allocations. However,
enabling this option can cause issues with external filter plugins
when working with (reallocating/freeing/allocating and passing back)
buffers.

Previously, this option was off by default for all CMake build types,
but only off by default for non-debug Autotools builds. Since debug
is the default build mode for HDF5 when built from source with
Autotools, this can result in surprising segfaults that don't occur
when an application is built against a release version of HDF5.
Therefore, this option is now off by default for all build types
across both CMake and Autotools.

(JTH - 2022/03/01)

- CPack will now generate RPM/DEB packages.

Enabled the RPM and DEB CPack generators on linux. In addition to
Expand Down