Changeset: 6be9e226415d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6be9e226415d Added Files: sql/backends/monet5/Tests/pyapi29.sql sql/backends/monet5/Tests/pyapi29.stable.err sql/backends/monet5/Tests/pyapi29.stable.out sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.oid32 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.oid32 Modified Files: configure.ag gdk/gdk_bbp.c monetdb5/optimizer/opt_garbageCollector.c sql/backends/monet5/Tests/All Branch: iot Log Message:
Merge with default diffs (truncated from 19866 to 300 lines): diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -162,7 +162,7 @@ AC_ARG_ENABLE(netcdf, [enable support for netcdf (default=auto)]), enable_netcdf=$enableval, enable_netcdf=$dft_netcdf) - + dft_lidar=auto AC_ARG_ENABLE(lidar, AS_HELP_STRING([--enable-lidar], @@ -299,6 +299,13 @@ AC_ARG_ENABLE(developer, enable_developer=$enableval, enable_developer=$dft_developer) +dft_sanitizer=no +AC_ARG_ENABLE(sanitizer, + AS_HELP_STRING([--enable-sanitizer], + [enable support for the GCC address sanitizer (default=no)]), + enable_sanitizer=$enableval, + enable_sanitizer=$dft_sanitizer) + dnl The console is a direct client hooked onto the kernel with full dnl administrative privileges, bypassing any security checks. It is dnl handy only during development. @@ -521,7 +528,7 @@ case "$host_os" in LINUX_DIST=`source /etc/os-release; echo ${ID}:${VERSION_ID}` elif test -s /etc/fedora-release ; then LINUX_DIST="`cat /etc/fedora-release | head -n1 \ - | sed 's|^.*\(Fedora\).* release \([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\2|'`" + | sed 's|^.*\(Fedora\).* release \([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\2|'`" elif test -s /etc/centos-release ; then LINUX_DIST="`cat /etc/centos-release | head -n1 \ | sed 's|^\(CentOS\).* release \([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\2|'`" @@ -533,7 +540,7 @@ case "$host_os" in | sed 's|^.*\(Red\) \(Hat\).* Linux *\([[A-Z]]*\) release \([[0-9]][[^ \n]]*\)\( .*\)*$|\1\2:\4\3|' \ | sed 's|^Red Hat Enterprise Linux \([[AW]]S\) release \([[0-9]][[^ \n]]*\)\( .*\)*$|RHEL:\2\1|' \ | sed 's|^\(CentOS\).* release \([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\2|' \ - | sed 's|^\(Scientific\) Linux.* release \([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\2|'`" + | sed 's|^\(Scientific\) Linux.* release \([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\2|'`" elif test -s /etc/SuSE-release ; then LINUX_DIST="`cat /etc/SuSE-release | head -n1 \ | sed 's|^.*\(S[[Uu]]SE\) LINUX Enterprise \([[SD]]\)[[ervsktop]]* \([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\3E\2|' \ @@ -542,7 +549,7 @@ case "$host_os" in | sed 's|^open\(S[[Uu]]SE\) \([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\2|'`" elif test -s /etc/gentoo-release ; then LINUX_DIST="`cat /etc/gentoo-release | head -n1 \ - | sed 's|^.*\(Gentoo\) Base System.* [[versionrelease]]* \([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\2|'`" + | sed 's|^.*\(Gentoo\) Base System.* [[versionrelease]]* \([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\2|'`" elif test -s /etc/lsb-release ; then LINUX_DIST="`grep '^DISTRIB_ID=' /etc/lsb-release | cut -d'=' -f2`:`grep '^DISTRIB_RELEASE=' /etc/lsb-release | cut -d'=' -f2`" elif test -s /etc/debian_version ; then @@ -604,7 +611,7 @@ dnl Set compiler switches. dnl The idea/goal is to be as strict as possible, i.e., enable preferably dnl *all* warnings and make them errors. This should help keep the code dnl as clean and portable as possible. -dnl It turned out, though, that this, especially turning all warnings into +dnl It turned out, though, that this, especially turning all warnings into dnl errors, is a bit too ambitious for configure/autoconf. Hence, we set dnl all flags that enable specific warnings and those that make the dnl compiler die on them (-Werror) in X_CFLAGS, which are added to the @@ -753,11 +760,31 @@ yes-*-*) dnl # 193: zero used for undefined preprocessing identifier dnl #1357: optimization disabled due to excessive resource requirements; contact Intel Premier Support for assistance dnl #1572: floating-point equality and inequality comparisons are unreliable - dnl #1599: declaration hides variable + dnl #1599: declaration hides variable dnl #2259: non-pointer conversion from "." to "." may lose significant bits ;; esac fi +if test "x$enable_sanitizer" != xno; then +case "$GCC" in +yes) + # if no specific sanitizer was specified, use address sanitizer + if test "x$enable_sanitizer" = xyes; then + MCHECK_ADD_FLAG([-fsanitize=address]) + else + MCHECK_ADD_FLAG([-fsanitize=$enable_sanitizer]) + if test "x$enable_sanitizer" = xthread; then + X_CFLAGS="$X_CFLAGS -DNO_ATOMIC_INSTRUCTIONS" + fi + fi + MCHECK_ADD_FLAG([-fno-omit-frame-pointer]) + ;; +*) + AC_MSG_ERROR([--enable-sanitizer only supported with GCC]) + ;; +esac +fi + AC_SUBST(CFLAGS) AC_SUBST(X_CFLAGS) @@ -778,7 +805,7 @@ case "$host_os" in solaris*) case "$GCC" in yes) ;; - *) + *) THREAD_SAVE_FLAGS="$THREAD_SAVE_FLAGS -mt" ;; esac @@ -1002,7 +1029,7 @@ if test "x$enable_optimize" = xyes; then JAVACFLAGS="$JAVACFLAGS -g:none -O" case "$GCC-$CC_ver" in yes-clang-*) - CFLAGS="$CFLAGS -O3 -fomit-frame-pointer" # -finline-functions is no longer supported in llvm 3.6 + CFLAGS="$CFLAGS -O3 -fomit-frame-pointer" # -finline-functions is no longer supported in llvm 3.6 ;; yes-*) dnl -fomit-frame-pointer crashes memprof @@ -1014,7 +1041,7 @@ if test "x$enable_optimize" = xyes; then # -ftree-builtin-call-dce -ftree-ccp -ftree-ch # -ftree-copyrename -ftree-dce -ftree-dominator-opts # -ftree-dse -ftree-forwprop -ftree-fre -ftree-phiprop - # -ftree-sra -ftree-pta -ftree-ter -funit-at-a-time + # -ftree-sra -ftree-pta -ftree-ter -funit-at-a-time # on top of this -fomit-frame-pointer is enabled on machines # where this does not interfere with debugging. # -O2 on gcc enables optimisations which do not involve a @@ -1035,7 +1062,7 @@ if test "x$enable_optimize" = xyes; then # of -O2: # -finline-functions, -funswitch-loops, # -fpredictive-commoning, -fgcse-after-reload, - # -ftree-vectorize and -fipa-cp-clone + # -ftree-vectorize and -fipa-cp-clone CFLAGS="-O3 -fomit-frame-pointer -pipe ${CFLAGS}" # because we explicitly disable debugging, we can explicitly # enable -fomit-frame-pointer here @@ -1076,7 +1103,7 @@ if test "x$enable_optimize" = xyes; then # x86_64-*-*-10.*) CFLAGS="$CFLAGS -axWPT ";; dnl We need to use -mp instead of -mp1 as otherwise nextafter() & nextafterf() do not work correctly for 0 - x86_64-*-*-11.*) CFLAGS="$CFLAGS -mp -O3 -restrict -unroll -axSSE4.2 ";; + x86_64-*-*-11.*) CFLAGS="$CFLAGS -mp -O3 -restrict -unroll -axSSE4.2 ";; dnl -mp does no longer exist with icc 15; using -mieee-fp, instead. dnl adding -axSSE4.2 (or even -axCORE-AVX512) results in errors like dnl "error: ODBCFetch has been targeted for automatic cpu dispatch" ... @@ -1116,7 +1143,7 @@ if test "x$enable_optimize" = xyes; then dnl (Mserver produces some incorrect BATpropcheck warnings); dnl hence, we use only "-O2", here. ;; - esac + esac ;; esac # for stack-traces with assert, we DO want a frame-pointer @@ -1767,7 +1794,7 @@ case "$have_bz2" in ;; esac -AC_MSG_CHECKING(for bzip2) +AC_MSG_CHECKING(for bzip2) if test "x$have_bz2" != xno; then save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BZ_CFLAGS" @@ -1831,7 +1858,7 @@ PTHREAD_INCS="" PTHREAD_EXTRA="" AC_ARG_WITH(pthread, AS_HELP_STRING([--with-pthread=DIR], - [pthread library is installed in DIR]), + [pthread library is installed in DIR]), have_pthread="$withval") case "$have_pthread" in @@ -1852,12 +1879,12 @@ if test "x$have_pthread" != xno; then CPPFLAGS="$CPPFLAGS $PTHREAD_INCS/pthread $PTHREAD_EXTRA" AC_CHECK_HEADER(pthread.h,[AC_DEFINE(HAVE_PTHREAD_H, 1, [Define if you have the pthread.h]) - AC_CHECK_HEADERS(pthread.h semaphore.h sched.h) - PTHREAD_INCS="$PTHREAD_INCS/pthread"]) + AC_CHECK_HEADERS(pthread.h semaphore.h sched.h) + PTHREAD_INCS="$PTHREAD_INCS/pthread"]) ;; *) CPPFLAGS="$CPPFLAGS $PTHREAD_INCS $PTHREAD_EXTRA" - AC_CHECK_HEADERS(pthread.h semaphore.h sched.h) + AC_CHECK_HEADERS(pthread.h semaphore.h sched.h) ;; esac CPPFLAGS="$save_CPPFLAGS" @@ -1868,7 +1895,7 @@ if test "x$have_pthread" != xno; then yes-auto-clang-5.*|yes-yes-clang-5.*|yes-auto-clang-6.*|yes-yes-clang-6.*|yes-auto-clang-7.*|yes-yes-clang-7.*) # clang 5.*/6.*/7.* (Xcode 6.0) does not # seem to have / require -pthread as compiler - # option; on Mac OS X Yosamite, "Apple LLVM + # option; on Mac OS X Yosamite, "Apple LLVM # version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)" # complains about "error: argument unused during # compilation: '-pthread'". @@ -1921,16 +1948,16 @@ if test "x$have_pthread" != xno; then ;; esac - AC_SEARCH_LIBS(pthread_kill, , + AC_SEARCH_LIBS(pthread_kill, , AC_DEFINE(HAVE_PTHREAD_KILL, 1, [Define if you have the pthread_kill function])) - AC_SEARCH_LIBS(pthread_sigmask, , + AC_SEARCH_LIBS(pthread_sigmask, , AC_DEFINE(HAVE_PTHREAD_SIGMASK, 1, [Define if you have the pthread_sigmask function])) - AC_SEARCH_LIBS(pthread_kill_other_threads_np, , + AC_SEARCH_LIBS(pthread_kill_other_threads_np, , AC_DEFINE(HAVE_PTHREAD_KILL_OTHER_THREADS_NP, 1, [Define if you have the pthread_kill_other_threads_np function])) - AC_SEARCH_LIBS(pthread_setschedprio, , + AC_SEARCH_LIBS(pthread_setschedprio, , AC_DEFINE(HAVE_PTHREAD_SETSCHEDPRIO, 1, [Define if you have the pthread_setschedprio function])) dnl this function very ugly is overloaded with semaphore stuff @@ -1964,7 +1991,7 @@ READLINE_LIBS="" READLINE_INCS="" AC_ARG_WITH(readline, AS_HELP_STRING([--with-readline=DIR], - [readline library is installed in DIR]), + [readline library is installed in DIR]), have_readline="$withval") case "$have_readline" in @@ -2534,8 +2561,8 @@ if test "x$have_proj" != xno ; then CPPFLAGS="$CPPFLAGS $PROJ_INCS" LDFLAGS="$LDFLAGS $PROJ_LIBS" AC_CHECK_HEADER(proj_api.h, - AC_CHECK_LIB(proj, pj_init_plus, - AC_DEFINE(HAVE_PROJ, 1, [Define if the proj library exists]), + AC_CHECK_LIB(proj, pj_init_plus, + AC_DEFINE(HAVE_PROJ, 1, [Define if the proj library exists]), [ if test "x$have_proj" != xauto; then AC_MSG_ERROR([-lproj library not found]); fi have_proj=no; why_have_proj="(proj library not found)" ], ), [ if test "x$have_proj" != xauto; then AC_MSG_ERROR([proj_api.h header not found]); fi @@ -2582,7 +2609,7 @@ if test "x$have_samtools" != xno; then [ why_have_samtools=; AC_DEFINE([HAVE_BAM_BAM_H], 1, [Define to 1 if you have the <samtools/bam.h> header file.]) ], [ why_have_samtools="Neither bam/bam.h or bam/bam.h header not found" ]) fi - + if test -z "$why_have_samtools"; then AC_CHECK_HEADER(samtools/sam.h, [ why_have_samtools=; AC_DEFINE([HAVE_SAMTOOLS_SAM_H], 1, [Define to 1 if you have the <samtools/sam.h> header file.]) ], @@ -2777,7 +2804,7 @@ yes|auto) fi # read include dirs, libs and cflags if test "x$have_liblas" != xno; then - LIBLAS_INCS="`$LIBLAS_CONFIG --includes`" + LIBLAS_INCS="`$LIBLAS_CONFIG --includes`" LIBLAS_LIBS="`$LIBLAS_CONFIG --libs`" fi # if lidar is enabled and liblas was not found abort @@ -3049,7 +3076,7 @@ case "$host_os" in esac if test "x$have_setsockopt" = xno; then - AC_CHECK_FUNC(setsockopt, [], + AC_CHECK_FUNC(setsockopt, [], AC_CHECK_LIB(socket, setsockopt, [ SOCKET_LIBS="-lsocket $SOCKET_LIBS"; have_setsockopt=yes; ])) fi @@ -3068,7 +3095,7 @@ if test "x$have_getaddrinfo" = xyes; the fi dnl incase of windows we need to use try_link because windows uses the -dnl pascal style of function calls and naming scheme. Therefore the +dnl pascal style of function calls and naming scheme. Therefore the dnl function needs to be compiled with the correct header AC_CHECK_TYPE(SOCKET, , AC_DEFINE(SOCKET,int,[type used for sockets]), [#ifdef HAVE_WINSOCK_H #include <winsock.h> @@ -3683,6 +3710,7 @@ for comp in \ 'debug ' \ 'optimize ' \ 'developer ' \ + 'sanitizer ' \ 'instrument' \ 'profile ' \ ; do diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -885,7 +885,7 @@ fixwkbheap(void) new = (var_t *) Tloc(b, BUNfirst(b)); for (i = 0; i < b->batCount; i++) { int len; - owkb = (struct old_wkb *) (h2.base + old[i]); + owkb = (struct old_wkb *) (h2.base + (old[i] << GDK_VARSHIFT)); if ((len = owkb->len) == ~0) len = 0; if ((new[i] = HEAP_malloc(b->T->vheap, offsetof(struct new_wkb, data) + len)) == 0) diff --git a/monetdb5/optimizer/opt_garbageCollector.c b/monetdb5/optimizer/opt_garbageCollector.c --- a/monetdb5/optimizer/opt_garbageCollector.c +++ b/monetdb5/optimizer/opt_garbageCollector.c @@ -128,7 +128,7 @@ OPTgarbageCollectorImplementation(Client chkDeclarations(cntxt->fdout, mb); } /* keep all actions taken as a post block comment */ - snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " usec","garbagecollctor",actions+1,GDKusec() - usec); + snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " usec","garbagecollector",actions+1,GDKusec() - usec); newComment(mb,buf); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list