Hello community,

here is the log from the commit of package mdds-1_2 for openSUSE:Factory 
checked in at 2016-09-16 10:59:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mdds-1_2 (Old)
 and      /work/SRC/openSUSE:Factory/.mdds-1_2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mdds-1_2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mdds-1_2/mdds-1_2.changes        2016-08-26 
23:12:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mdds-1_2.new/mdds-1_2.changes   2016-09-16 
10:59:22.000000000 +0200
@@ -1,0 +2,6 @@
+Sun Sep 11 07:34:05 UTC 2016 - tchva...@suse.com
+
+- Version update to 1.2.2:
+  * fix to handle out-of-range insertions on flat_segment_tree
+
+-------------------------------------------------------------------

Old:
----
  mdds-1.2.1.tar.bz2

New:
----
  mdds-1.2.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mdds-1_2.spec ++++++
--- /var/tmp/diff_new_pack.I384Qw/_old  2016-09-16 10:59:23.000000000 +0200
+++ /var/tmp/diff_new_pack.I384Qw/_new  2016-09-16 10:59:23.000000000 +0200
@@ -21,7 +21,7 @@
 %define _apiver 1.2
 %define _oname mdds
 Name:           %{_oname}-1_2
-Version:        1.2.1
+Version:        1.2.2
 Release:        0
 Summary:        A collection of multi-dimensional data structure and indexing 
algorithm
 License:        MIT

++++++ mdds-1.2.1.tar.bz2 -> mdds-1.2.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/CHANGELOG new/mdds-1.2.2/CHANGELOG
--- old/mdds-1.2.1/CHANGELOG    2016-06-18 20:50:29.000000000 +0200
+++ new/mdds-1.2.2/CHANGELOG    2016-09-07 04:18:38.000000000 +0200
@@ -1,4 +1,11 @@
-mdds 1.2.1 (not yet released)
+mdds 1.2.2 (not-yet-released)
+
+* flat_segment_tree
+
+  * fixed a bug that would cause segmentation faults with the insert()
+    method with out-of-bound segment value pair.
+
+mdds 1.2.1
 
 * multi_type_vector
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/Makefile.in new/mdds-1.2.2/Makefile.in
--- old/mdds-1.2.1/Makefile.in  2016-06-08 04:09:51.000000000 +0200
+++ new/mdds-1.2.2/Makefile.in  2016-09-10 00:45:40.000000000 +0200
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -117,16 +127,12 @@
 @RUN_MEMORY_TESTS_TRUE@        trie_map_test_mem.mem
 
 subdir = .
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(top_srcdir)/configure $(am__configure_deps) \
-       $(top_srcdir)/example/Makefile.in \
-       $(top_srcdir)/src/test.mem.in $(top_srcdir)/misc/mdds.pc.in \
-       $(srcdir)/VERSION.in depcomp $(dist_docs_DATA) test-driver \
-       AUTHORS COPYING NEWS install-sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+       $(am__configure_deps) $(dist_docs_DATA) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
@@ -514,6 +520,10 @@
 MEM_LOG_COMPILE = $(MEM_LOG_COMPILER) $(AM_MEM_LOG_FLAGS) \
        $(MEM_LOG_FLAGS)
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/VERSION.in \
+       $(top_srcdir)/example/Makefile.in \
+       $(top_srcdir)/misc/mdds.pc.in $(top_srcdir)/src/test.mem.in \
+       AUTHORS COPYING NEWS depcomp install-sh missing test-driver
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -643,6 +653,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -736,7 +747,6 @@
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -1121,7 +1131,7 @@
        if test -n "$$am__remaking_logs"; then \
          echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
               "recursion detected" >&2; \
-       else \
+       elif test -n "$$redo_logs"; then \
          am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
        fi; \
        if $(am__make_dryrun); then :; else \
@@ -1411,15 +1421,15 @@
        $(am__post_remove_distdir)
 
 dist-tarZ: distdir
-       @echo WARNING: "Support for shar distribution archives is" \
-                      "deprecated." >&2
+       @echo WARNING: "Support for distribution archives compressed with" \
+                      "legacy program 'compress' is deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__post_remove_distdir)
 
 dist-shar: distdir
-       @echo WARNING: "Support for distribution archives compressed with" \
-                      "legacy program 'compress' is deprecated." >&2
+       @echo WARNING: "Support for shar distribution archives is" \
+                      "deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
@@ -1455,17 +1465,17 @@
        esac
        chmod -R a-w $(distdir)
        chmod u+w $(distdir)
-       mkdir $(distdir)/_build $(distdir)/_inst
+       mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
        chmod a-w $(distdir)
        test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 
's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
          && am__cwd=`pwd` \
-         && $(am__cd) $(distdir)/_build \
-         && ../configure \
+         && $(am__cd) $(distdir)/_build/sub \
+         && ../../configure \
            $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
-           --srcdir=.. --prefix="$$dc_install_base" \
+           --srcdir=../.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -1661,6 +1671,8 @@
        uninstall uninstall-am uninstall-dist_docsDATA uninstall-local \
        uninstall-nodist_docsDATA uninstall-nodist_pkgconfDATA
 
+.PRECIOUS: Makefile
+
 
 test.fst.perf: flat_segment_tree_test
        ./flat_segment_tree_test perf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/README.md new/mdds-1.2.2/README.md
--- old/mdds-1.2.1/README.md    2016-05-12 02:46:57.000000000 +0200
+++ new/mdds-1.2.2/README.md    2016-06-24 03:49:41.000000000 +0200
@@ -102,6 +102,7 @@
 
 | Version | API Version | Release Date | Download | Check Sum | File Size 
(bytes) |
 
|---------|-------------|--------------|----------|-----------|-------------------|
+| 1.2.1 | 1.2 | 2016-06-23 | 
[mdds-1.2.1.tar.bz2](http://kohei.us/files/mdds/src/mdds-1.2.1.tar.bz2) | 
sha256sum: 1e2f49dfc7b9d444bad07064837099741f4c2d061807173392ad2357116dfc7b | 
285426 |
 | 1.2.0 | 1.2 | 2016-05-11 | 
[mdds-1.2.0.tar.bz2](http://kohei.us/files/mdds/src/mdds-1.2.0.tar.bz2) | 
sha256sum: f44fd0635de94c7d490f9a65f74b5e55860d7bdd507951428294f9690fda45b6 | 
284962 |
 | 1.1.0 | 1.0 | 2016-02-10 | 
[mdds-1.1.0.tar.bz2](http://kohei.us/files/mdds/src/mdds-1.1.0.tar.bz2) | 
sha256sum: 4253ab93fe8bb579321a50e247f1f800191ab99fe2d8c6c181741b8bd3fb161f | 
258691 |
 | 1.0.0 | 1.0 | 2015-10-06 | 
[mdds_1.0.0.tar.bz2](http://kohei.us/files/mdds/src/mdds_1.0.0.tar.bz2) | 
sha256sum: ef8abc1236b54c7ca16ae1ee38abfb9cdbc5d1e6a2427c65b92b8c1003e3bf56 | 
166619 |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/aclocal.m4 new/mdds-1.2.2/aclocal.m4
--- old/mdds-1.2.1/aclocal.m4   2016-06-08 04:09:51.000000000 +0200
+++ new/mdds-1.2.2/aclocal.m4   2016-09-10 00:45:40.000000000 +0200
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 
'autoreconf'.])])
 
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.14'
+[am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.14.1], [],
+m4_if([$1], [1.15], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,14 +51,14 @@
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.14.1])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -103,15 +103,14 @@
 # configured tree to be moved without reconfiguration.
 
 AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 ])
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -142,7 +141,7 @@
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -333,7 +332,7 @@
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -409,7 +408,7 @@
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -499,8 +498,8 @@
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -573,7 +572,11 @@
 END
     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
   fi
-fi])
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
@@ -602,7 +605,7 @@
 done
 echo "timestamp for $_am_arg" 
>`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -613,7 +616,7 @@
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\    *)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -623,7 +626,7 @@
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -645,7 +648,7 @@
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -680,7 +683,7 @@
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -730,7 +733,7 @@
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -769,7 +772,7 @@
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -800,7 +803,7 @@
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -881,7 +884,7 @@
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -941,7 +944,7 @@
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -969,7 +972,7 @@
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -988,7 +991,7 @@
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/configure new/mdds-1.2.2/configure
--- old/mdds-1.2.1/configure    2016-06-08 04:09:51.000000000 +0200
+++ new/mdds-1.2.2/configure    2016-09-10 00:45:41.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for mdds 1.2.1.
+# Generated by GNU Autoconf 2.69 for mdds 1.2.2.
 #
 # Report bugs to <kohei.yosh...@gmail.com>.
 #
@@ -579,8 +579,8 @@
 # Identity of this package.
 PACKAGE_NAME='mdds'
 PACKAGE_TARNAME='mdds'
-PACKAGE_VERSION='1.2.1'
-PACKAGE_STRING='mdds 1.2.1'
+PACKAGE_VERSION='1.2.2'
+PACKAGE_STRING='mdds 1.2.2'
 PACKAGE_BUGREPORT='kohei.yosh...@gmail.com'
 PACKAGE_URL=''
 
@@ -668,6 +668,7 @@
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -744,6 +745,7 @@
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -996,6 +998,15 @@
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1133,7 +1144,7 @@
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir
+               libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1246,7 +1257,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 1.2.1 to adapt to many kinds of systems.
+\`configure' configures mdds 1.2.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1286,6 +1297,7 @@
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1312,7 +1324,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mdds 1.2.1:";;
+     short | recursive ) echo "Configuration of mdds 1.2.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1411,7 +1423,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mdds configure 1.2.1
+mdds configure 1.2.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1466,7 +1478,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 1.2.1, which was
+It was created by mdds $as_me 1.2.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -1814,7 +1826,7 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-am__api_version='1.14'
+am__api_version='1.15'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2015,8 +2027,8 @@
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 if test x"${MISSING+set}" != xset; then
   case $am_aux_dir in
@@ -2035,7 +2047,7 @@
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\    *)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -2329,7 +2341,7 @@
 
 # Define the identity of the package.
  PACKAGE='mdds'
- VERSION='1.2.1'
+ VERSION='1.2.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2363,8 +2375,8 @@
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
@@ -2422,6 +2434,7 @@
   fi
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable 
maintainer-specific portions of Makefiles" >&5
 $as_echo_n "checking whether to enable maintainer-specific portions of 
Makefiles... " >&6; }
     # Check whether --enable-maintainer-mode was given.
@@ -2445,7 +2458,7 @@
 
 
 
-VERSION=1.2.1
+VERSION=1.2.2
 API_VERSION=1.2
 
 
@@ -3931,7 +3944,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 1.2.1, which was
+This file was extended by mdds $as_me 1.2.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3988,7 +4001,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 1.2.1
+mdds config.status 1.2.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-1.2.1/configure.ac new/mdds-1.2.2/configure.ac
--- old/mdds-1.2.1/configure.ac 2016-06-08 04:08:46.000000000 +0200
+++ new/mdds-1.2.2/configure.ac 2016-09-07 04:16:23.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT(mdds, 1.2.1, kohei.yosh...@gmail.com)
+AC_INIT(mdds, 1.2.2, kohei.yosh...@gmail.com)
 AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
 AM_MAINTAINER_MODE
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/include/Makefile.in 
new/mdds-1.2.2/include/Makefile.in
--- old/mdds-1.2.1/include/Makefile.in  2016-06-08 04:09:51.000000000 +0200
+++ new/mdds-1.2.2/include/Makefile.in  2016-09-10 00:45:41.000000000 +0200
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -76,11 +86,11 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = include
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -139,6 +149,7 @@
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -252,6 +263,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -276,7 +288,6 @@
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --foreign include/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -564,6 +575,8 @@
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/include/mdds/Makefile.in 
new/mdds-1.2.2/include/mdds/Makefile.in
--- old/mdds-1.2.1/include/mdds/Makefile.in     2016-06-08 04:09:51.000000000 
+0200
+++ new/mdds-1.2.2/include/mdds/Makefile.in     2016-09-10 00:45:41.000000000 
+0200
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -77,12 +87,12 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = include/mdds
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(headers_HEADERS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(headers_HEADERS) \
+       $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -170,6 +180,7 @@
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -283,6 +294,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -338,7 +350,6 @@
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign 
include/mdds/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --foreign include/mdds/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -651,6 +662,8 @@
        mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
        tags-am uninstall uninstall-am uninstall-headersHEADERS
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/include/mdds/flat_segment_tree.hpp 
new/mdds-1.2.2/include/mdds/flat_segment_tree.hpp
--- old/mdds-1.2.1/include/mdds/flat_segment_tree.hpp   2015-11-14 
00:57:33.000000000 +0100
+++ new/mdds-1.2.2/include/mdds/flat_segment_tree.hpp   2016-09-07 
04:14:41.000000000 +0200
@@ -675,6 +675,15 @@
 
     void destroy();
 
+    /**
+     * Check and optionally adjust the start and end key values if one of them
+     * is out-of-bound.
+     *
+     * @return true if the start and end key values are valid, either with or
+     *         without adjustments, otherwise false.
+     */
+    bool adjust_segment_range(key_type& start_key, key_type& end_key) const;
+
 private:
     std::vector<nonleaf_node> m_nonleaf_node_pool;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/include/mdds/flat_segment_tree_def.inl 
new/mdds-1.2.2/include/mdds/flat_segment_tree_def.inl
--- old/mdds-1.2.1/include/mdds/flat_segment_tree_def.inl       2015-09-23 
04:13:14.000000000 +0200
+++ new/mdds-1.2.2/include/mdds/flat_segment_tree_def.inl       2016-09-07 
04:14:41.000000000 +0200
@@ -130,21 +130,9 @@
 ::std::pair<typename flat_segment_tree<_Key, _Value>::const_iterator, bool>
 flat_segment_tree<_Key, _Value>::insert_segment_impl(key_type start_key, 
key_type end_key, value_type val, bool forward)
 {
-    typedef ::std::pair<typename flat_segment_tree<_Key, 
_Value>::const_iterator, bool> ret_type;
+    typedef std::pair<typename flat_segment_tree<_Key, 
_Value>::const_iterator, bool> ret_type;
 
-    if (end_key < m_left_leaf->value_leaf.key || start_key > 
m_right_leaf->value_leaf.key)
-        // The new segment does not overlap the current interval.
-        return ret_type(const_iterator(this, true), false);
-
-    if (start_key < m_left_leaf->value_leaf.key)
-        // The start value should not be smaller than the current minimum.
-        start_key = m_left_leaf->value_leaf.key;
-
-    if (end_key > m_right_leaf->value_leaf.key)
-        // The end value should not be larger than the current maximum.
-        end_key = m_right_leaf->value_leaf.key;
-
-    if (start_key >= end_key)
+    if (!adjust_segment_range(start_key, end_key))
         return ret_type(const_iterator(this, true), false);
 
     // Find the node with value that either equals or is greater than the
@@ -325,6 +313,12 @@
         return insert_front(start_key, end_key, val);
     }
 
+    if (!adjust_segment_range(start_key, end_key))
+    {
+        typedef std::pair<typename flat_segment_tree<_Key, 
_Value>::const_iterator, bool> ret_type;
+        return ret_type(const_iterator(this, true), false);
+    }
+
     p = get_insertion_pos_leaf(start_key, p);
     node_ptr start_pos(const_cast<node*>(p));
     return insert_to_pos(start_pos, start_key, end_key, val);
@@ -763,4 +757,26 @@
     m_root_node = nullptr;
 }
 
+template<typename _Key, typename _Value>
+bool flat_segment_tree<_Key, _Value>::adjust_segment_range(key_type& 
start_key, key_type& end_key) const
+{
+    if (start_key >= end_key)
+        // Invalid order of segment range.
+        return false;
+
+    if (end_key < m_left_leaf->value_leaf.key || start_key > 
m_right_leaf->value_leaf.key)
+        // The new segment does not overlap the current interval.
+        return false;
+
+    if (start_key < m_left_leaf->value_leaf.key)
+        // The start value should not be smaller than the current minimum.
+        start_key = m_left_leaf->value_leaf.key;
+
+    if (end_key > m_right_leaf->value_leaf.key)
+        // The end value should not be larger than the current maximum.
+        end_key = m_right_leaf->value_leaf.key;
+
+    return true;
+}
+
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mdds-1.2.1/include/mdds/multi_type_vector/Makefile.in 
new/mdds-1.2.2/include/mdds/multi_type_vector/Makefile.in
--- old/mdds-1.2.1/include/mdds/multi_type_vector/Makefile.in   2016-06-08 
04:09:51.000000000 +0200
+++ new/mdds-1.2.2/include/mdds/multi_type_vector/Makefile.in   2016-09-10 
00:45:41.000000000 +0200
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -77,12 +87,12 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = include/mdds/multi_type_vector
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(headers_HEADERS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(headers_HEADERS) \
+       $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -153,6 +163,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -241,6 +252,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -269,7 +281,6 @@
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign 
include/mdds/multi_type_vector/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --foreign include/mdds/multi_type_vector/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -509,6 +520,8 @@
        pdf-am ps ps-am tags tags-am uninstall uninstall-am \
        uninstall-headersHEADERS
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/include/mdds/sorted_string_map_def.inl 
new/mdds-1.2.2/include/mdds/sorted_string_map_def.inl
--- old/mdds-1.2.1/include/mdds/sorted_string_map_def.inl       2016-02-12 
04:17:41.000000000 +0100
+++ new/mdds-1.2.2/include/mdds/sorted_string_map_def.inl       2016-09-07 
04:14:41.000000000 +0200
@@ -64,7 +64,7 @@
     m_entry_size(entry_size),
     m_entry_end(m_entries+m_entry_size)
 {
-#ifdef _GLIBCXX_DEBUG
+#if defined(_GLIBCXX_DEBUG) || defined(MDDS_ASSERT_STRING_MAP)
     assert(std::is_sorted(m_entries, m_entry_end, detail::compare<_ValueT>));
 #endif
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.1/src/flat_segment_tree_test.cpp 
new/mdds-1.2.2/src/flat_segment_tree_test.cpp
--- old/mdds-1.2.1/src/flat_segment_tree_test.cpp       2015-07-07 
00:37:10.000000000 +0200
+++ new/mdds-1.2.2/src/flat_segment_tree_test.cpp       2016-09-07 
04:14:41.000000000 +0200
@@ -1949,6 +1949,44 @@
     assert(db == db2);
 }
 
+void fst_test_insert_out_of_bound()
+{
+    stack_printer __stack_printer__("::fst_test_insert_out_of_bound");
+
+    typedef flat_segment_tree<int, bool> db_type;
+    db_type db(0, 10, false);
+
+    // An out-of-bound range, whether it's in part or in its entirety, should
+    // be handled gracefully without throwing exceptions or causing segfaults.
+
+    // ranges that are entirely out-of-bound.
+
+    auto ret = db.insert_front(-10, -8, false);
+    assert(!ret.second);
+    db.insert_back(12, 13, false);
+    assert(!ret.second);
+
+    db_type::const_iterator pos = db.end();
+
+    ret = db.insert(pos, -10, -8, false);
+    assert(!ret.second);
+    pos = ret.first;
+
+    ret = db.insert(pos, 12, 13, false);
+    assert(!ret.second);
+    pos = ret.first;
+
+    // partial overflows.
+
+    ret = db.insert(pos, -2, 2, true);
+    assert(ret.second); // content modified
+    pos = ret.first;
+
+    ret = db.insert(pos, 8, 20, true);
+    assert(ret.second); // content modified
+    pos = ret.first;
+}
+
 int main (int argc, char **argv)
 {
     try
@@ -2004,6 +2042,7 @@
             fst_test_clear();
             fst_test_assignment();
             fst_test_non_numeric_value();
+            fst_test_insert_out_of_bound();
         }
 
         if (opt.test_perf)


Reply via email to