I also use the YouCompleteMe plugin without problem
with the latest vim.
However vim built with libpython3 (or libpython) unfortunately
gives many warnings. This is explained here:
https://github.com/python/cpython/blob/master/Misc/README.valgrind
I just avoided the warning in libpython3 by doing this
on xubuntu-18.04.4:
1) download and build Python3 source code:
$ wget
https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz
$ tar xvf Python-3.8.2.tar.xz
$ ./configure --with-valgrind--enable-shared
$ make -j8
$ sudo make install
$ sudo lddconfig
(note the --with-valgrind option which is needed to avoid valgrind errors)
2) rebuild vim
$ cd vim
$ rm src/auto/config.cache
$ ./configure --with-features=huge --enable-gui=gtk3 --enable-python3interp=yes
$ make -j8
$ sudo make install
3) rebuild the YouCompleteVimPlugin
Assuming you installed it with Vundle, then you can rebuild it with:
$ cd ~/.vim/bundle/YouCompleteMe
$ ./install.py --clang-completer
And then I can run vim with valgrind without the ugly
valgrind errors. Well, I still get a couple of errors
with valgrind in libpython but far less that I used to see
and only at startup. I still get:
==29794== Conditional jump or move depends on uninitialised value(s)
==29794== at 0x9014E77: __wcsnlen_avx2 (strlen-avx2.S:261)
==29794== by 0x8F42EC1: wcsrtombs (wcsrtombs.c:104)
==29794== by 0x8EC8B20: wcstombs (wcstombs.c:34)
==29794== by 0x88BFA47: wcstombs (stdlib.h:154)
==29794== by 0x88BFA47: encode_current_locale (fileutils.c:653)
==29794== by 0x88BFA47: encode_locale_ex (fileutils.c:763)
==29794== by 0x88BFA47: encode_locale (fileutils.c:773)
==29794== by 0x88BFA47: _Py_EncodeLocaleRaw (fileutils.c:809)
==29794== by 0x88C0E00: _Py_wreadlink (fileutils.c:1675)
==29794== by 0x88C1B57: calculate_argv0_path (getpath.c:962)
==29794== by 0x88C1B57: calculate_path (getpath.c:1238)
==29794== by 0x88C3438: _PyPathConfig_Calculate (getpath.c:1353)
==29794== by 0x889316F: pathconfig_calculate (pathconfig.c:317)
==29794== by 0x889316F: config_calculate_pathconfig (pathconfig.c:335)
==29794== by 0x889316F: _PyConfig_InitPathConfig (pathconfig.c:402)
==29794== by 0x8885A43: config_read (initconfig.c:1718)
==29794== by 0x8885A43: PyConfig_Read (initconfig.c:2448)
==29794== by 0x8899712: pyinit_core (pylifecycle.c:853)
==29794== by 0x8899712: Py_InitializeFromConfig (pylifecycle.c:1035)
==29794== by 0x889A37B: Py_InitializeEx (pylifecycle.c:1073)
==29794== by 0x353AC4: Python3_Init (if_python3.c:908)
==29794== by 0x353AC4: DoPyCommand (if_python3.c:970)
And a couple more but only when starting vim, after that
don't get more valgrind errors anymore.
Can you try something like that too?
Regards
Dominique