Patch 8.2.1579
Problem:    Reports from asan are not optimal.
Solution:   Use clang with ubsan. (James McCoy, closes #6811)
Files:      .travis.yml


*** ../vim-8.2.1578/.travis.yml 2020-09-01 17:50:48.312192933 +0200
--- .travis.yml 2020-09-03 16:04:09.284251592 +0200
***************
*** 2,8 ****
  
  env:
    global:
!     - BUILD=yes TEST=test CONFOPT= LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= 
SRCDIR=./src CHECK_AUTOCONF=no
  
  _anchors:
    envs:
--- 2,8 ----
  
  env:
    global:
!     - BUILD=yes TEST=test CONFOPT= LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= 
SRCDIR=./src CHECK_AUTOCONF=no LOG_DIR="$TRAVIS_BUILD_DIR/logs"
  
  _anchors:
    envs:
***************
*** 25,32 ****
      - &coverage
        CFLAGS="--coverage -DUSE_GCOV_FLUSH" LDFLAGS=--coverage
      - &asan # ASAN build
!       SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE 
-fsanitize=address -fno-omit-frame-pointer"
!       ASAN_OPTIONS="print_stacktrace=1 log_path=asan" 
LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
      - &shadowopt
        SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow
  
--- 25,32 ----
      - &coverage
        CFLAGS="--coverage -DUSE_GCOV_FLUSH" LDFLAGS=--coverage
      - &asan # ASAN build
!       SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE 
-fsanitize-recover=all -fsanitize=address -fsanitize=undefined 
-fno-omit-frame-pointer"
!       ASAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/asan" 
UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan" 
LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
      - &shadowopt
        SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow
  
***************
*** 35,41 ****
      dist: bionic
      addons:
        apt:
!         packages:
            - autoconf
            - clang
            - lcov
--- 35,41 ----
      dist: bionic
      addons:
        apt:
!         packages: &apt-packages
            - autoconf
            - clang
            - lcov
***************
*** 108,120 ****
      # Update pyenv to fix the error "/opt/pyenv/libexec/pyenv: line 43: cd: 
asan_symbolize-6.0: Not a directory".
      # https://github.com/pyenv/pyenv/issues/580
      - (cd "${PYENV_ROOT}" && git fetch -p origin && git checkout "$(git 
rev-list --tags -n1)") &>/dev/null || true
!     - find . -type f -name 'asan.*' -size +0 2>/dev/null | xargs grep -l 
'^==[[:digit:]]*==ERROR:' | xargs -I{} -n1 -t asan_symbolize -l{}
  
  branches:
    except:
      - /^v[0-9]/
  
  script:
    - NPROC=$(getconf _NPROCESSORS_ONLN)
    - set -o errexit
    - echo -e "\\033[33;1mConfiguring Vim\\033[0m" && echo -en 
"travis_fold:start:configure\\r\\033[0K"
--- 108,121 ----
      # Update pyenv to fix the error "/opt/pyenv/libexec/pyenv: line 43: cd: 
asan_symbolize-6.0: Not a directory".
      # https://github.com/pyenv/pyenv/issues/580
      - (cd "${PYENV_ROOT}" && git fetch -p origin && git checkout "$(git 
rev-list --tags -n1)") &>/dev/null || true
!     - for f in $(grep -l '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "$LOG_DIR"/*); 
do asan_symbolize-11 -l "$f"; done
  
  branches:
    except:
      - /^v[0-9]/
  
  script:
+   - mkdir -p "$LOG_DIR"
    - NPROC=$(getconf _NPROCESSORS_ONLN)
    - set -o errexit
    - echo -e "\\033[33;1mConfiguring Vim\\033[0m" && echo -en 
"travis_fold:start:configure\\r\\033[0K"
***************
*** 135,141 ****
        # Append various warning flags to CFLAGS.
        # BSD sed needs backup extension specified.
        sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
!       if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then
          # On macOS, the entity of gcc is clang.
          sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
        else
--- 136,142 ----
        # Append various warning flags to CFLAGS.
        # BSD sed needs backup extension specified.
        sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
!       if [[ "${TRAVIS_OS_NAME}" = "osx" ]] || [[ "${CC}" = "clang-11" ]]; then
          # On macOS, the entity of gcc is clang.
          sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
        else
***************
*** 155,160 ****
--- 156,170 ----
    - echo -e "\\033[33;1mTesting Vim\\033[0m" && echo -en 
"travis_fold:start:test\\r\\033[0K"
    - do_test make ${SHADOWOPT} ${TEST} && FOLD_MARKER=travis_fold
    - echo -en "${FOLD_MARKER}:end:test\\r\\033[0K"
+   - |
+     # Not all sanitizers will cause the tests to fail.  This helps since we 
can
+     # see all the failures instead of just the first one, but we still want 
the
+     # test phase to fail if any sanitizer issues are detected.
+     if [[ -n "${ASAN_OPTIONS}" ]]; then
+       if grep -q '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "$LOG_DIR"/*; then
+         false
+       fi
+     fi
  
  # Instead of using all environments with both compilers on both systems,
  # exclude some builds on mac os x and linux.
***************
*** 241,248 ****
          - *coverage
        after_success: *eval-coverage
      - <<: *linux # ASAN
!       name: huge+asan/gcc
!       compiler: gcc
        env:
          - *linux-huge
          - *asan
--- 251,266 ----
          - *coverage
        after_success: *eval-coverage
      - <<: *linux # ASAN
!       name: huge+asan/clang
!       compiler: clang-11
!       addons:
!         apt:
!           sources:
!             - sourceline: 'deb http://apt.llvm.org/bionic/ 
llvm-toolchain-bionic-11 main'
!               key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
!           packages:
!             - *apt-packages
!             - clang-11
        env:
          - *linux-huge
          - *asan
*** ../vim-8.2.1578/src/version.c       2020-09-02 22:33:20.824524597 +0200
--- src/version.c       2020-09-03 16:03:10.872468285 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1579,
  /**/

-- 
Have you heard about the new Barbie doll?  It's called Divorce
Barbie.  It comes with most of Ken's stuff.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202009031405.083E5USR051143%40masaka.moolenaar.net.

Raspunde prin e-mail lui