libelektra: Range checks fail with clang + memcheck

Steps to Reproduce the Problem

docker build doc/docker/debian/stretch/. -t buildelektra-stretch
docker run -it -u 29295:29401 -v `pwd`:/app/src buildelektra-stretch
HOME=/tmp/home
mkdir -p $HOME
cp -R /app/src /tmp/workspace && cd /tmp/workspace
mkdir build && cd build
cmake -DBINDINGS=ALL -DPLUGINS=ALL -DKDB_DB_SYSTEM=/tmp/home/.config/kdb/system -DKDB_DB_SPEC=/tmp/home/.config/kdb/spec ..
make -j 2
make run_memcheck

Expected Result

Tests should pass.

Actual Result

Tests report memory leaks but all test results pass

-- Processing memory checking output: #
Memory checking results:
FIM - 1
IPW - 12
Uninitialized Memory Read - 12

System Information

  • Elektra Version: master
  • Dockerfile from #1866
  • same behaviour on build system and locally

Further Log Files and Output

Full Log This only occurs when the container is run with non root userids. DynamicAnalysis.xml

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 25 (25 by maintainers)

Most upvoted comments

We disabled the range test for the valgrind + clang combination. asan still tests it and reports no problems.

I took a look at the glib source - the allocation is related to global state inside glib.

I took some time but could not figure why it is fine with glib 2.50 on stretch and not with glib 2.42 on jessie. I also made sure that the present valgrind suppression rules do not mask the leak on stretch.

After all cleanup is fine with the later version of glib. I created PR #1875 which updates the supression rules for this instance.