From 89ed96fab9124517e537f6864c3b626c983e89e7 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 26 Aug 2020 07:14:42 -0400 Subject: [PATCH 1/7] travis: Bump Linux dist to bionic [skip appveyor] --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34ff492bb6..6ee79e1331 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: xenial +dist: bionic language: c @@ -119,7 +119,7 @@ jobs: apt: sources: - sourceline: 'ppa:ubuntu-toolchain-r/test' - - sourceline: 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/prod xenial main' + - sourceline: 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main' key_url: 'https://packages.microsoft.com/keys/microsoft.asc' packages: - *common-apt-packages From f7434bab73ec97ddb25be312a366e91c255074b2 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 26 Aug 2020 07:35:54 -0400 Subject: [PATCH 2/7] travis: Install powershell via "snaps" addon [skip appveyor] --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6ee79e1331..f13c362bc2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -116,15 +116,15 @@ jobs: - BUSTED_ARGS="--coverage" - *common-job-env addons: + snaps: + - name: powershell + confinement: classic apt: sources: - sourceline: 'ppa:ubuntu-toolchain-r/test' - - sourceline: 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main' - key_url: 'https://packages.microsoft.com/keys/microsoft.asc' packages: - *common-apt-packages - gcc-9 - - powershell - if: branch = master AND commit_message !~ /\[skip.lint\]/ name: lint os: linux From 16e69eae704c18f6081dac6802e106ad78c65288 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 26 Aug 2020 21:11:16 -0400 Subject: [PATCH 3/7] travis: Relax pyenv versions to 2.7:3.8 We don't care about the specifics of the patch version, so just set the major:minor. [skip appveyor] --- ci/before_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/before_install.sh b/ci/before_install.sh index 1cf60edf73..c3fd8bdbde 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -22,7 +22,7 @@ if [[ "${TRAVIS_OS_NAME}" != osx ]] && command -v pyenv; then echo 'Setting Python versions via pyenv' # Prefer Python 2 over 3 (more conservative). - pyenv global 2.7.15:3.7.1 + pyenv global 2.7:3.8 echo 'Updated Python info:' ( From 2516386c6b40f5c313d33f838facb40ce5796b23 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 27 Aug 2020 22:50:38 -0400 Subject: [PATCH 4/7] travis: Install clang-11 for ASAN/UBSAN job [skip appveyor] --- .travis.yml | 11 ++++++++++- ci/common/test.sh | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f13c362bc2..4aebae3986 100644 --- a/.travis.yml +++ b/.travis.yml @@ -99,12 +99,21 @@ jobs: - stage: baseline name: clang-asan os: linux - compiler: clang + compiler: clang-11 # Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6 env: - CLANG_SANITIZER=ASAN_UBSAN - CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON" + - SYMBOLIZER=asan_symbolize-11 - *common-job-env + 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: + - *common-apt-packages + - clang-11 - name: gcc-coverage (gcc 9) os: linux compiler: gcc-9 diff --git a/ci/common/test.sh b/ci/common/test.sh index b2fbeaf2da..4ef6260339 100644 --- a/ci/common/test.sh +++ b/ci/common/test.sh @@ -82,7 +82,7 @@ valgrind_check() { check_sanitizer() { if test -n "${CLANG_SANITIZER}"; then - check_logs "${1}" "*san.*" + check_logs "${1}" "*san.*" | ${SYMBOLIZER:-cat} fi } From 74ad66404fff6ea4a5ffa219855deed1ebeb383e Mon Sep 17 00:00:00 2001 From: James McCoy Date: Fri, 28 Aug 2020 00:00:59 -0400 Subject: [PATCH 5/7] suggest_trie_walk: Remove invalid FALLTHROUGH annotation --- src/nvim/spell.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 05bb501fa2..dc1bfe25b4 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -4405,8 +4405,6 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so } break; - FALLTHROUGH; - case STATE_INS: // Insert one byte. Repeat this for each possible byte at this // node. From 33bf6f9ada84b9bb143cc8864461afec249c27bf Mon Sep 17 00:00:00 2001 From: James McCoy Date: Fri, 4 Sep 2020 11:09:25 -0400 Subject: [PATCH 6/7] ci: Try to recover from sanitizer issues When running in CI, we want to find as many problems as possible instead. Let the code try to keep running from recoverable issues so we report all the sanitize issues we can. --- src/nvim/CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 7b4438b896..2d98f1a659 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -624,9 +624,19 @@ if(CLANG_ASAN_UBSAN) message(STATUS "Enabling Clang address sanitizer and undefined behavior sanitizer for nvim.") check_c_compiler_flag(-fno-sanitize-recover=all SANITIZE_RECOVER_ALL) if(SANITIZE_RECOVER_ALL) - set(SANITIZE_RECOVER -fno-sanitize-recover=all) # Clang 3.6+ + if(TRAVIS_CI_BUILD) + # Try to recover from all sanitize issues so we get reports about all failures + set(SANITIZE_RECOVER -fsanitize-recover=all) # Clang 3.6+ + else() + set(SANITIZE_RECOVER -fno-sanitize-recover=all) # Clang 3.6+ + endif() else() - set(SANITIZE_RECOVER -fno-sanitize-recover) # Clang 3.5- + if(TRAVIS_CI_BUILD) + # Try to recover from all sanitize issues so we get reports about all failures + set(SANITIZE_RECOVER -fsanitize-recover) # Clang 3.5- + else() + set(SANITIZE_RECOVER -fno-sanitize-recover) # Clang 3.5- + endif() endif() set_property(TARGET nvim APPEND PROPERTY COMPILE_DEFINITIONS EXITFREE) set_property(TARGET nvim APPEND PROPERTY COMPILE_OPTIONS ${SANITIZE_RECOVER} -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address -fsanitize=undefined -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/src/.asan-blacklist) From 83a7b1b5db99be8017dfd4f84d995035dd3b414e Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 6 Sep 2020 12:09:36 -0400 Subject: [PATCH 7/7] test/helpers: Run $SYMBOLIZER to decode sanitizer logs, if it is set --- test/helpers.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/test/helpers.lua b/test/helpers.lua index 40b93d9935..7817345617 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -200,14 +200,25 @@ function module.check_logs() end end fd:close() - os.remove(file) if #lines > 0 then + local status, f local out = io.stdout + if os.getenv('SYMBOLIZER') then + status, f = pcall(module.popen_r, os.getenv('SYMBOLIZER'), '-l', file) + end out:write(start_msg .. '\n') - out:write('= ' .. table.concat(lines, '\n= ') .. '\n') + if status then + for line in f:lines() do + out:write('= '..line..'\n') + end + f:close() + else + out:write('= ' .. table.concat(lines, '\n= ') .. '\n') + end out:write(select(1, start_msg:gsub('.', '=')) .. '\n') table.insert(runtime_errors, file) end + os.remove(file) end end end