389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
210 stars 90 forks source link

Fix gcc fanalyzer issues #6248

Closed progier389 closed 2 months ago

progier389 commented 3 months ago

Issue Description gcc -fanalyzer displays errors

Package Version and Platform:

  1. Steps to Reproduce

Steps to reproduce the behavior:

podman run -ti --rm quay.io/389ds/devcontainer /bin/bash

git clone https://github.com/389ds/389-ds-base cd 389-ds-base sed -i 's/debug_cflags="-g3 -ggdb -gdwarf-5 -O0"/debug_cflags="-g3 -ggdb -gdwarf-5 -O0 -fanalyzer"/' configure.ac ./autogen.sh ./configure --enable-debug make 2> stderr.log grep Wanalyzer stderr.log

Expected results Final grep should be empty

Additional context PR #6246 fixed some of the issues but there are still some others

progier389 commented 2 months ago

Bad news https://scan6.scan.coverity.com/#/project-view/58468/11545 shows that PR https://github.com/389ds/389-ds-base/pull/6246 generated 300 new defects (related to slapi_pblock_get) Probably because internal and github coverity scan tools have not the same version or the same configuration ...

vashirov commented 2 months ago

To me it looks like they updated their scanner and it now reports a new kind of defect.