Merge pull request #12802 from jamessan/travis-ubuntu-bump

This commit is contained in:
James McCoy 2020-09-06 12:52:37 -04:00 committed by GitHub
commit d6b280799f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 13 deletions

View File

@ -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

View File

@ -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:'
(

View File

@ -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
}

View File

@ -624,10 +624,20 @@ 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)
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()
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)
set_property(TARGET nvim APPEND_STRING PROPERTY LINK_FLAGS "-fsanitize=address -fsanitize=undefined ")

View File

@ -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.

View File

@ -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')
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