diff -Nru mdds-0.11.1/configure mdds-0.11.2/configure --- mdds-0.11.1/configure 2014-10-03 00:44:03.540015532 +0000 +++ mdds-0.11.2/configure 2014-12-18 20:05:56.495025986 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for mdds 0.11.1. +# Generated by GNU Autoconf 2.69 for mdds 0.11.2. # # Report bugs to . # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='mdds' PACKAGE_TARNAME='mdds' -PACKAGE_VERSION='0.11.1' -PACKAGE_STRING='mdds 0.11.1' +PACKAGE_VERSION='0.11.2' +PACKAGE_STRING='mdds 0.11.2' PACKAGE_BUGREPORT='kohei.yoshida@gmail.com' PACKAGE_URL='' @@ -1181,7 +1181,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures mdds 0.11.1 to adapt to many kinds of systems. +\`configure' configures mdds 0.11.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1242,7 +1242,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of mdds 0.11.1:";; + short | recursive ) echo "Configuration of mdds 0.11.2:";; esac cat <<\_ACEOF @@ -1335,7 +1335,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -mdds configure 0.11.1 +mdds configure 0.11.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1352,7 +1352,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by mdds $as_me 0.11.1, which was +It was created by mdds $as_me 0.11.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1701,7 +1701,7 @@ -VERSION=0.11.1 +VERSION=0.11.2 PACKAGE_TARNAME=mdds @@ -2298,7 +2298,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mdds $as_me 0.11.1, which was +This file was extended by mdds $as_me 0.11.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2351,7 +2351,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -mdds config.status 0.11.1 +mdds config.status 0.11.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -3455,7 +3455,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mdds $as_me 0.11.1, which was +This file was extended by mdds $as_me 0.11.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3508,7 +3508,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -mdds config.status 0.11.1 +mdds config.status 0.11.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -4613,7 +4613,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mdds $as_me 0.11.1, which was +This file was extended by mdds $as_me 0.11.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4666,7 +4666,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -mdds config.status 0.11.1 +mdds config.status 0.11.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -5772,7 +5772,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mdds $as_me 0.11.1, which was +This file was extended by mdds $as_me 0.11.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5825,7 +5825,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -mdds config.status 0.11.1 +mdds config.status 0.11.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru mdds-0.11.1/configure.ac mdds-0.11.2/configure.ac --- mdds-0.11.1/configure.ac 2014-10-03 00:44:03.265015525 +0000 +++ mdds-0.11.2/configure.ac 2014-12-18 20:05:56.174026009 +0000 @@ -1,4 +1,4 @@ -AC_INIT(mdds, 0.11.1, kohei.yoshida@gmail.com) +AC_INIT(mdds, 0.11.2, kohei.yoshida@gmail.com) VERSION=AC_PACKAGE_VERSION AC_SUBST(VERSION) diff -Nru mdds-0.11.1/debian/changelog mdds-0.11.2/debian/changelog --- mdds-0.11.1/debian/changelog 2014-10-03 10:06:32.000000000 +0000 +++ mdds-0.11.2/debian/changelog 2014-12-19 13:08:38.000000000 +0000 @@ -1,3 +1,9 @@ +mdds (0.11.2-1) experimental; urgency=medium + + * New upstream release + + -- Rene Engelhard Fri, 19 Dec 2014 14:08:18 +0100 + mdds (0.11.1-1) unstable; urgency=medium * New upstream release diff -Nru mdds-0.11.1/debian/patches/dont-install-unneeded-docfiles.diff mdds-0.11.2/debian/patches/dont-install-unneeded-docfiles.diff --- mdds-0.11.1/debian/patches/dont-install-unneeded-docfiles.diff 2013-05-09 19:30:58.000000000 +0000 +++ mdds-0.11.2/debian/patches/dont-install-unneeded-docfiles.diff 2014-12-19 13:09:27.000000000 +0000 @@ -1,10 +1,10 @@ --- mdds-0.6.1.orig/Makefile.in +++ mdds-0.6.1/Makefile.in -@@ -215,7 +215,6 @@ - install -m 644 -t $(DESTDIR)@includedir@/mdds/compat @top_srcdir@/$(INCDIR)/mdds/compat/*.hpp - install -m 644 -t $(DESTDIR)@includedir@/mdds/hash_container @top_srcdir@/$(INCDIR)/mdds/hash_container/*.hpp - install -m 644 -t $(DESTDIR)@datarootdir@/pkgconfig $(MISCDIR)/mdds.pc -- install -m 644 -t $(DESTDIR)@docdir@ @top_srcdir@/AUTHORS @top_srcdir@/COPYING @top_srcdir@/NEWS @top_srcdir@/README @top_srcdir@/VERSION +@@ -246,7 +246,6 @@ + install -m 644 @top_srcdir@/$(INCDIR)/mdds/compat/*.hpp $(DESTDIR)@includedir@/mdds/compat + install -m 644 @top_srcdir@/$(INCDIR)/mdds/hash_container/*.hpp $(DESTDIR)@includedir@/mdds/hash_container + install -m 644 $(MISCDIR)/mdds.pc $(DESTDIR)@datarootdir@/pkgconfig +- install -m 644 @top_srcdir@/AUTHORS @top_srcdir@/COPYING @top_srcdir@/NEWS @top_srcdir@/README @top_srcdir@/VERSION $(DESTDIR)@docdir@ check: $(ALL_TESTS) diff -Nru mdds-0.11.1/include/mdds/multi_type_vector_def.inl mdds-0.11.2/include/mdds/multi_type_vector_def.inl --- mdds-0.11.1/include/mdds/multi_type_vector_def.inl 2014-10-03 00:44:03.274015525 +0000 +++ mdds-0.11.2/include/mdds/multi_type_vector_def.inl 2014-12-18 20:05:56.186026008 +0000 @@ -364,6 +364,7 @@ // Append to the previous block. size_type offset = blk_prev->m_size; blk->m_size -= 1; + element_block_func::overwrite_values(*blk->mp_data, 0, 1); element_block_func::erase(*blk->mp_data, 0); blk_prev->m_size += 1; mdds_mtv_append_value(*blk_prev->mp_data, value); @@ -411,6 +412,7 @@ // Pop the last cell off the current block, and prepend the // new cell to the next block. + element_block_func::overwrite_values(*blk->mp_data, blk->m_size-1, 1); element_block_func::erase(*blk->mp_data, blk->m_size-1); blk->m_size -= 1; mdds_mtv_prepend_value(*blk_next->mp_data, value); @@ -440,6 +442,7 @@ // Pop the last element from the current block, and prepend the cell // into the next block. + element_block_func::overwrite_values(*blk->mp_data, blk->m_size-1, 1); element_block_func::erase(*blk->mp_data, blk->m_size-1); blk->m_size -= 1; mdds_mtv_prepend_value(*blk_next->mp_data, value); @@ -1170,7 +1173,10 @@ block* blk = m_blocks[block_index]; blk->m_size -= 1; if (blk->mp_data) + { + element_block_func::overwrite_values(*blk->mp_data, 0, 1); element_block_func::erase(*blk->mp_data, 0); + } m_blocks.insert(m_blocks.begin()+block_index, new block(1)); blk = m_blocks[block_index]; create_new_block_with_new_cell(blk->mp_data, cell); @@ -1183,7 +1189,10 @@ assert(block_index < m_blocks.size()); block* blk = m_blocks[block_index]; if (blk->mp_data) + { + element_block_func::overwrite_values(*blk->mp_data, blk->m_size-1, 1); element_block_func::erase(*blk->mp_data, blk->m_size-1); + } blk->m_size -= 1; m_blocks.insert(m_blocks.begin()+block_index+1, new block(1)); blk = m_blocks[block_index+1]; diff -Nru mdds-0.11.1/include/mdds/multi_type_vector_types.hpp mdds-0.11.2/include/mdds/multi_type_vector_types.hpp --- mdds-0.11.1/include/mdds/multi_type_vector_types.hpp 2014-10-03 00:44:03.275015525 +0000 +++ mdds-0.11.2/include/mdds/multi_type_vector_types.hpp 2014-12-18 20:05:56.187026008 +0000 @@ -40,6 +40,7 @@ #include #if defined(MDDS_UNIT_TEST) || defined (MDDS_MULTI_TYPE_VECTOR_DEBUG) +#include #include #include using std::cout; diff -Nru mdds-0.11.1/Makefile.in mdds-0.11.2/Makefile.in --- mdds-0.11.1/Makefile.in 2014-10-03 00:44:03.265015525 +0000 +++ mdds-0.11.2/Makefile.in 2014-12-18 20:05:56.174026009 +0000 @@ -241,12 +241,12 @@ install -d $(DESTDIR)@docdir@ install -d $(DESTDIR)@datarootdir@ install -d $(DESTDIR)@datarootdir@/pkgconfig - install -m 644 -t $(DESTDIR)@includedir@/mdds @top_srcdir@/$(INCDIR)/mdds/*.hpp - install -m 644 -t $(DESTDIR)@includedir@/mdds @top_srcdir@/$(INCDIR)/mdds/*.inl - install -m 644 -t $(DESTDIR)@includedir@/mdds/compat @top_srcdir@/$(INCDIR)/mdds/compat/*.hpp - install -m 644 -t $(DESTDIR)@includedir@/mdds/hash_container @top_srcdir@/$(INCDIR)/mdds/hash_container/*.hpp - install -m 644 -t $(DESTDIR)@datarootdir@/pkgconfig $(MISCDIR)/mdds.pc - install -m 644 -t $(DESTDIR)@docdir@ @top_srcdir@/AUTHORS @top_srcdir@/COPYING @top_srcdir@/NEWS @top_srcdir@/README @top_srcdir@/VERSION + install -m 644 @top_srcdir@/$(INCDIR)/mdds/*.hpp $(DESTDIR)@includedir@/mdds + install -m 644 @top_srcdir@/$(INCDIR)/mdds/*.inl $(DESTDIR)@includedir@/mdds + install -m 644 @top_srcdir@/$(INCDIR)/mdds/compat/*.hpp $(DESTDIR)@includedir@/mdds/compat + install -m 644 @top_srcdir@/$(INCDIR)/mdds/hash_container/*.hpp $(DESTDIR)@includedir@/mdds/hash_container + install -m 644 $(MISCDIR)/mdds.pc $(DESTDIR)@datarootdir@/pkgconfig + install -m 644 @top_srcdir@/AUTHORS @top_srcdir@/COPYING @top_srcdir@/NEWS @top_srcdir@/README @top_srcdir@/VERSION $(DESTDIR)@docdir@ check: $(ALL_TESTS) diff -Nru mdds-0.11.1/NEWS mdds-0.11.2/NEWS --- mdds-0.11.1/NEWS 2014-10-03 00:44:03.265015525 +0000 +++ mdds-0.11.2/NEWS 2014-12-18 20:05:56.174026009 +0000 @@ -1,3 +1,10 @@ +mdds 0.11.2 + +* multi_type_vector + + * fixed various memory leaks associated with the set() method when a + value overwrites an existing element in a managed block. + mdds 0.11.1 * all diff -Nru mdds-0.11.1/src/multi_type_vector_test_custom.cpp mdds-0.11.2/src/multi_type_vector_test_custom.cpp --- mdds-0.11.1/src/multi_type_vector_test_custom.cpp 2014-10-03 00:44:03.277015525 +0000 +++ mdds-0.11.2/src/multi_type_vector_test_custom.cpp 2014-12-18 20:05:56.191026008 +0000 @@ -961,6 +961,36 @@ delete p1; delete p2; } + + { + mtv_type db(5); + + db.set(1, new muser_cell(1.1)); + db.set(2, new muser_cell(1.2)); + db.set(3, new muser_cell(1.3)); + + db.set(1, 2.1); // Don't leak the overwritten muser_cell instance. + db.set(2, 2.2); // ditto + } + + { + mtv_type db(4); + db.set(0, new muser_cell(1.1)); + db.set(1, new muser_cell(1.2)); + db.set(2, new muser_cell(1.3)); + + db.set(2, 2.1); // Don't leak the overwritten muser_cell instance. + db.set(1, 2.0); // ditto + } + + { + mtv_type db(8); + db.set(3, new muser_cell(1.1)); + db.set(4, new muser_cell(1.2)); + db.set(5, 1.3); + + db.set(4, 2.2); // Overwrite muser_cell and don't leak. + } } void mtv_test_custom_block_func1()