diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2012-01-09 21:24:50 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2012-01-09 21:24:50 (GMT) |
commit | 00b9f24d9b161817876921a8bd983ed1d148def1 (patch) | |
tree | c57416b820a40440905528abe5b3b62c51495f1b /tools/h5repack/h5repack.sh.in | |
parent | e0db7c89228e73cd3e30604f4987ee3146a8380f (diff) | |
download | hdf5-00b9f24d9b161817876921a8bd983ed1d148def1.zip hdf5-00b9f24d9b161817876921a8bd983ed1d148def1.tar.gz hdf5-00b9f24d9b161817876921a8bd983ed1d148def1.tar.bz2 |
[svn-r21869] Purpose:
Fix for HDFFV-7840 h5repack: memory leak over one of the h5diff test file
Description:
Turned out that there were two causes of memory leaks.
1. for handling variable length string in attribute.
2. for handling compound type with non-reference members.
The first issue is fixed in copy_attr() which is updated to use h5tools_detect_vlen to take care of vlen string as well as vlen data.
The second is fixed in copy_refs_attr() of compound handling code.
Tested:
jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Windows (32-LE), Cmake (jam)
Diffstat (limited to 'tools/h5repack/h5repack.sh.in')
-rwxr-xr-x | tools/h5repack/h5repack.sh.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 88611ce..c1cbba1 100755 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -101,6 +101,7 @@ $SRC_H5REPACK_TESTFILES/h5repack_refs.h5 $SRC_H5REPACK_TESTFILES/h5repack_shuffle.h5 $SRC_H5REPACK_TESTFILES/h5repack_soffset.h5 $SRC_H5REPACK_TESTFILES/h5repack_szip.h5 +$SRC_H5DIFF_TESTFILES/h5diff_attr1.h5 $SRC_TOOLS_TESTFILES/tfamily00000.h5 $SRC_TOOLS_TESTFILES/tfamily00001.h5 $SRC_TOOLS_TESTFILES/tfamily00002.h5 @@ -800,6 +801,14 @@ TOOLTEST h5repack_refs.h5 # the references in attribute of compund or vlen datatype TOOLTEST h5repack_attr_refs.h5 + +# Add test for memory leak in attirbute. This test is verified by CTEST. +# 1. leak from vlen string +# 2. leak from compound type without reference member +# (HDFFV-7840, ) +# Note: this test is experimental for sharing test file among tools +TOOLTEST h5diff_attr1.h5 + if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." exit $EXIT_SUCCESS |