apache / celix

Apache Celix is a framework for C and C++14 to develop dynamic modular software applications using component and in-process service-oriented programming.
https://celix.apache.org/
Apache License 2.0
165 stars 86 forks source link

Coverity and `celix_auto` #754

Open PengZheng opened 3 months ago

PengZheng commented 3 months ago

It turns out that currently Coverity does not know __attribute__((cleanup(func))), which leads to lots of false positive reports. For a simple example, check https://scan9.scan.coverity.com/#/project-view/52268/10253?selectedIssue=392558

Some extra configuration/modeling efforts may be needed to make Coverity work again.

pnoltes commented 2 months ago

I am not sure if we can configure coverity to cope with __attribute__((cleanup(func))).

There is some option for a model reference, see: https://scan.coverity.com/tune But as far as I can tell this does not help, because coverity does not register that then func is called once a variable goes out of scope.