diff options
-rw-r--r-- | .travis.yml | 19 | ||||
-rwxr-xr-x | ci/before_install.sh | 2 | ||||
-rw-r--r-- | ci/common/test.sh | 2 | ||||
-rw-r--r-- | src/nvim/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/nvim/spell.c | 2 | ||||
-rw-r--r-- | test/helpers.lua | 15 |
6 files changed, 41 insertions, 13 deletions
diff --git a/.travis.yml b/.travis.yml index 34ff492bb6..4aebae3986 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: xenial +dist: bionic language: c @@ -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 @@ -116,15 +125,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/16.04/prod xenial 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 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:' ( 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 } 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) 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. 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 |