Skip to content

Commit

Permalink
Cleanup the vlagrind run
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Staletic committed Dec 19, 2020
1 parent f08a6df commit cfc3bbe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 59 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Expand Up @@ -28,7 +28,7 @@ jobs:
YCM_BENCHMARK: true
COVERAGE: false
'C++ linting':
YCM_PYTHON_VERSION: '3.9.0'
YCM_PYTHON_VERSION: '3.9.1'
YCM_CLANG_TIDY: true
COVERAGE: false
maxParallel: 5
Expand Down
8 changes: 6 additions & 2 deletions azure/linux/install_dependencies.sh
Expand Up @@ -5,7 +5,6 @@ set -e
# Compiler setup
#
sudo apt-get update
sudo apt-get install libsqlite3-dev
if [ "${YCM_COMPILER}" == "clang" ]; then
sudo apt-get install clang-7
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-7 100
Expand All @@ -19,8 +18,13 @@ fi
if [ "${YCM_CLANG_TIDY}" ]; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y clang-tidy valgrind
sudo apt-get install -y clang-tidy libc6-dbg build-essential
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-10 100
wget https://sourceware.org/pub/valgrind/valgrind-3.16.1.tar.bz2
tar xf valgrind-3.16.1.tar.bz2
pushd valgrind-3.16.1
./configure && make -j3 && sudo make install
popd
fi

#
Expand Down
54 changes: 0 additions & 54 deletions valgrind.suppressions
@@ -1,54 +0,0 @@
# Invalid conditional jumps

{
https://github.com/python/cpython/blob/v3.9.0/Objects/unicodeobject.c#L3443
Memcheck:Cond
fun:PyUnicode_Decode
fun:PyUnicode_Decode
}
{
https://github.com/python/cpython/blob/v3.9.0/Objects/unicodeobject.c#L3731
Memcheck:Cond
fun:PyUnicode_AsEncodedString
fun:PyUnicode_AsEncodedString
}
# Definite leaks detected
{
Pybind11 leak to prevent crashes due to CPython bug. Fixed in 3.9.1
Memcheck:Leak
match-leak-kinds: definite
fun:_Znwm
fun:_ZN8pybind1112cpp_function18initialize_genericEPNS_6detail15function_recordEPKcPKPKSt9type_infom
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:_dl_map_object_deps
fun:dl_open_worker
fun:_dl_catch_exception
fun:_dl_open
fun:dlopen_doit
fun:_dl_catch_exception
fun:_dl_catch_error
fun:_dlerror_run
fun:dlopen@@GLIBC_2.2.5
fun:_PyImport_FindSharedFuncptr
fun:_PyImport_LoadDynamicModuleWithSpec
}
{
https://bugs.llvm.org/show_bug.cgi?id=47832
Memcheck:Leak
match-leak-kinds: definite
fun:_ZnwmRKSt9nothrow_t
fun:_ZN4llvm20WritableMemoryBuffer21getNewUninitMemBufferEmRKNS_5TwineE
fun:_ZN4llvm12MemoryBuffer16getMemBufferCopyENS_9StringRefERKNS_5TwineE
fun:_ZL31clang_parseTranslationUnit_ImplPvPKcPKS1_iN4llvm8ArrayRefI13CXUnsavedFileEEjPP21CXTranslationUnitImpl
fun:_ZN4llvm12function_refIFvvEE11callback_fnIZ35clang_parseTranslationUnit2FullArgvEUlvE_EEvl
fun:_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE
fun:_ZL26RunSafelyOnThread_DispatchPv
fun:_ZL14threadFuncSyncPv
fun:start_thread
fun:clone
}
2 changes: 2 additions & 0 deletions ycmd/tests/utils_test.py
Expand Up @@ -462,6 +462,7 @@ def ImportAndCheckCore_Compatible_test( logger ):
assert_that( logger.method_calls, empty() )


@pytest.mark.valgrind_skip
def ImportAndCheckCore_Unexpected_test():
RunImportAndCheckCoreException( {
'exception_message': 'unexpected import exception',
Expand All @@ -470,6 +471,7 @@ def ImportAndCheckCore_Unexpected_test():
} )


@pytest.mark.valgrind_skip
def ImportAndCheckCore_Missing_test():
RunImportAndCheckCoreException( {
'exception_message': "No module named 'ycm_core'",
Expand Down
7 changes: 5 additions & 2 deletions ycmd/utils.py
Expand Up @@ -498,8 +498,11 @@ def ImportAndCheckCore():
"""Checks if ycm_core library is compatible and returns with an exit
status."""
try:
LoadYcmCoreDependencies()
ycm_core = ImportCore()
try:
ycm_core = ImportCore()
except ImportError:
LoadYcmCoreDependencies()
ycm_core = ImportCore()
except ImportError as error:
message = str( error )
if CORE_MISSING_ERROR_REGEX.match( message ):
Expand Down

0 comments on commit cfc3bbe

Please sign in to comment.