Hello community, here is the log from the commit of package mdds for openSUSE:Factory checked in at 2014-02-28 07:24:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mdds (Old) and /work/SRC/openSUSE:Factory/.mdds.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "mdds" Changes: -------- --- /work/SRC/openSUSE:Factory/mdds/mdds.changes 2014-01-30 11:33:53.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.mdds.new/mdds.changes 2014-02-28 07:24:26.000000000 +0100 @@ -1,0 +2,6 @@ +Tue Feb 25 19:50:47 UTC 2014 - tchvatal@suse.com + +- Version bump to 0.10.2: + * Various bugfixes among 0.10 series found during lo 4.2.1 phase. + +------------------------------------------------------------------- Old: ---- mdds_0.10.1.tar.bz2 New: ---- mdds_0.10.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mdds.spec ++++++ --- /var/tmp/diff_new_pack.Nn7HGe/_old 2014-02-28 07:24:26.000000000 +0100 +++ /var/tmp/diff_new_pack.Nn7HGe/_new 2014-02-28 07:24:26.000000000 +0100 @@ -17,7 +17,7 @@ Name: mdds -Version: 0.10.1 +Version: 0.10.2 Release: 0 Summary: A collection of multi-dimensional data structure and indexing algorithm License: MIT ++++++ mdds_0.10.1.tar.bz2 -> mdds_0.10.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdds_0.10.1/Makefile.in new/mdds_0.10.2/Makefile.in --- old/mdds_0.10.1/Makefile.in 2014-01-08 16:43:37.000000000 +0100 +++ new/mdds_0.10.2/Makefile.in 2014-02-12 15:34:42.000000000 +0100 @@ -42,7 +42,16 @@ @top_srcdir@/$(INCDIR)/mdds/quad_node.hpp \ @top_srcdir@/$(INCDIR)/mdds/rectangle_set_def.inl \ @top_srcdir@/$(INCDIR)/mdds/rectangle_set.hpp \ - @top_srcdir@/$(INCDIR)/mdds/segment_tree.hpp + @top_srcdir@/$(INCDIR)/mdds/segment_tree.hpp \ + @top_srcdir@/$(INCDIR)/mdds/multi_type_vector.hpp \ + @top_srcdir@/$(INCDIR)/mdds/multi_type_vector_custom_func1.hpp \ + @top_srcdir@/$(INCDIR)/mdds/multi_type_vector_custom_func2.hpp \ + @top_srcdir@/$(INCDIR)/mdds/multi_type_vector_custom_func3.hpp \ + @top_srcdir@/$(INCDIR)/mdds/multi_type_vector_itr.hpp \ + @top_srcdir@/$(INCDIR)/mdds/multi_type_vector_trait.hpp \ + @top_srcdir@/$(INCDIR)/mdds/multi_type_vector_types.hpp \ + @top_srcdir@/$(INCDIR)/mdds/multi_type_vector_macro.hpp \ + @top_srcdir@/$(INCDIR)/mdds/multi_type_vector_def.inl DEPENDS= \ $(HEADERS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdds_0.10.1/NEWS new/mdds_0.10.2/NEWS --- old/mdds_0.10.1/NEWS 2014-01-08 16:43:37.000000000 +0100 +++ new/mdds_0.10.2/NEWS 2014-02-12 15:34:42.000000000 +0100 @@ -1,3 +1,14 @@ +mdds 0.10.2 + +* multi_type_vector + + * fixed a bug in transfer() that would trigger an assertion and + eventually lead to a crash. The problem occurred when a range of + data to be transferred spanned over 2 blocks and consisted of the + lower part of an upper block and the upper part of a lower block. + +mdds 0.10.1 + * multi_type_matrix * added a variant of set_empty() that takes an additional length diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdds_0.10.1/configure new/mdds_0.10.2/configure --- old/mdds_0.10.1/configure 2014-01-08 16:43:37.000000000 +0100 +++ new/mdds_0.10.2/configure 2014-02-12 15:34:42.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for mdds 0.10.1. +# Generated by GNU Autoconf 2.69 for mdds 0.10.2. # # Report bugs to <kohei.yoshida@gmail.com>. # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='mdds' PACKAGE_TARNAME='mdds' -PACKAGE_VERSION='0.10.1' -PACKAGE_STRING='mdds 0.10.1' +PACKAGE_VERSION='0.10.2' +PACKAGE_STRING='mdds 0.10.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.10.1 to adapt to many kinds of systems. +\`configure' configures mdds 0.10.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.10.1:";; + short | recursive ) echo "Configuration of mdds 0.10.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.10.1 +mdds configure 0.10.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.10.1, which was +It was created by mdds $as_me 0.10.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1701,7 +1701,7 @@ -VERSION=0.10.1 +VERSION=0.10.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.10.1, which was +This file was extended by mdds $as_me 0.10.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.10.1 +mdds config.status 0.10.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.10.1, which was +This file was extended by mdds $as_me 0.10.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.10.1 +mdds config.status 0.10.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.10.1, which was +This file was extended by mdds $as_me 0.10.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.10.1 +mdds config.status 0.10.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.10.1, which was +This file was extended by mdds $as_me 0.10.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.10.1 +mdds config.status 0.10.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdds_0.10.1/configure.ac new/mdds_0.10.2/configure.ac --- old/mdds_0.10.1/configure.ac 2014-01-08 16:43:37.000000000 +0100 +++ new/mdds_0.10.2/configure.ac 2014-02-12 15:34:42.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT(mdds, 0.10.1, kohei.yoshida@gmail.com) +AC_INIT(mdds, 0.10.2, kohei.yoshida@gmail.com) VERSION=AC_PACKAGE_VERSION AC_SUBST(VERSION) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdds_0.10.1/include/mdds/multi_type_vector_def.inl new/mdds_0.10.2/include/mdds/multi_type_vector_def.inl --- old/mdds_0.10.1/include/mdds/multi_type_vector_def.inl 2014-01-08 16:43:37.000000000 +0100 +++ new/mdds_0.10.2/include/mdds/multi_type_vector_def.inl 2014-02-12 15:34:42.000000000 +0100 @@ -1556,9 +1556,10 @@ else { // Copy to the middle of destination block. Insert slots for new - // blocks (plus one for the empty block) below current. + // blocks (plus one for the bottom empty block) below current. size_type blk2_size = blk_dest->m_size - dest_pos_in_block - len; dest.m_blocks.insert(dest.m_blocks.begin()+dest_block_index+1, block_len+1, NULL); + assert(dest.m_blocks.size() > dest_block_index+block_len+1); dest.m_blocks[dest_block_index+block_len+1] = new block(blk2_size); blk_dest->m_size = dest_pos_in_block; @@ -1657,7 +1658,39 @@ dest.merge_with_adjacent_blocks(dest_block_index1); // Delete all transferred blocks, and replace it with one empty block. - assert(del_index2 >= del_index1); + if (del_index2 < del_index1) + { + // No blocks will be deleted. See if we can just extend one of the + // neighboring empty blocks. + + block* blk1 = m_blocks[block_index1]; + block* blk2 = m_blocks[block_index2]; + + if (!blk1->mp_data) + { + assert(blk2->mp_data); + + // Block 1 is empty. Extend this block. + blk1->m_size += len; + return get_iterator(block_index1, start_pos_in_block1); + } + + if (!blk2->mp_data) + { + assert(blk1->mp_data); + + // Block 2 is empty. Extend this block. + blk2->m_size += len; + return get_iterator(block_index2, start_pos); + } + + // Neither block1 nor block2 are empty. Just insert a new empty block + // between them. After the insertion, the old block2 position becomes + // the position of the inserted block. + m_blocks.insert(m_blocks.begin()+block_index2, new block(len)); + return get_iterator(block_index2, start_pos); + } + if (del_index1 > 0 && !m_blocks[del_index1-1]->mp_data) { // The block before the first block to be deleted is empty. Simply diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdds_0.10.1/src/multi_type_vector_test_default.cpp new/mdds_0.10.2/src/multi_type_vector_test_default.cpp --- old/mdds_0.10.1/src/multi_type_vector_test_default.cpp 2014-01-08 16:43:37.000000000 +0100 +++ new/mdds_0.10.2/src/multi_type_vector_test_default.cpp 2014-02-12 15:34:42.000000000 +0100 @@ -4791,6 +4791,95 @@ assert(mtv::uchar_element_block::block_type == mtv::element_type_uchar); } +void mtv_test_transfer() +{ + stack_printer __stack_printer__("::mtv_test_transfer"); + mtv_type db1(5), db2(5); + db1.set(0, 1.0); + db1.set(1, 2.0); + mtv_type::iterator it = db1.transfer(1, 2, db2, 1); + + assert(db1.get<double>(0) == 1.0); + assert(db1.is_empty(1)); + assert(db1.is_empty(2)); + assert(db1.is_empty(3)); + assert(db1.is_empty(4)); + + assert(db2.is_empty(0)); + assert(db2.get<double>(1) == 2.0); + assert(db2.is_empty(2)); + assert(db2.is_empty(3)); + assert(db2.is_empty(4)); + + assert(it->size == 4); + assert(it->__private_data.block_index == 1); + assert(it->position == 1); + + // Reset and start over. + db1.clear(); + db1.resize(5); + db2.clear(); + db2.resize(5); + + db1.set(2, 1.2); + db1.set(3, 1.3); + + // Transfer 1:2 in db1 to 2:3 in db2. + it = db1.transfer(1, 2, db2, 2); + + assert(db1.is_empty(0)); + assert(db1.is_empty(1)); + assert(db1.is_empty(2)); + assert(db1.get<double>(3) == 1.3); + assert(db1.is_empty(4)); + + assert(db2.is_empty(0)); + assert(db2.is_empty(1)); + assert(db2.is_empty(2)); + assert(db2.get<double>(3) == 1.2); + assert(db2.is_empty(4)); + + assert(it->size == 3); + assert(it->position == 0); + assert(it->__private_data.block_index == 0); + + // Reset and start over. + db1.clear(); + db1.resize(4); + db2.clear(); + db2.resize(4); + + db1.set(0, string("A")); + db1.set(1, string("B")); + db1.set(2, 11.1); + db1.set(3, 11.2); + + it = db1.transfer(1, 2, db2, 1); + + assert(db1.get<string>(0) == "A"); + assert(db1.is_empty(1)); + assert(db1.is_empty(2)); + assert(db1.get<double>(3) == 11.2); + + assert(db2.is_empty(0)); + assert(db2.get<string>(1) == "B"); + assert(db2.get<double>(2) == 11.1); + assert(db2.is_empty(3)); + + assert(it->size == 2); + assert(it->position == 1); + assert(it->__private_data.block_index == 1); + + // Reset and start over. + db1.clear(); + db1.resize(4); + db2.clear(); + db2.resize(4); + + db1.set(2, 12.8); + it = db1.transfer(1, 2, db2, 1); +} + } int main (int argc, char **argv) @@ -4826,6 +4915,7 @@ mtv_test_swap_range(); mtv_test_value_type(); mtv_test_block_identifier(); + mtv_test_transfer(); cout << "Test finished successfully!" << endl; return EXIT_SUCCESS; -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de