Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverity issues #54

Open
abierman opened this issue Nov 29, 2016 · 8 comments
Open

Coverity issues #54

abierman opened this issue Nov 29, 2016 · 8 comments

Comments

@abierman
Copy link

Coverity reports a lot of issues with this library.

Coverity Scan is free for open source projects

https://scan.coverity.com/

@malinengineer
Copy link
Contributor

@abierman That's not very helpful.. Maybe come up with some Coverty logs and proposals on how to fix some of those issues..

@obgm
Copy link
Owner

obgm commented Nov 29, 2016

I have registered the project with coverity and submitted the current develop HEAD for analysis. The defects will be visible soon here.

@abierman
Copy link
Author

We pay for Coverity and our license does not allow us to share coverity logs.
There are plenty of memory leaks and use of NULL pointers.

@obgm
Copy link
Owner

obgm commented Nov 29, 2016

So, most are in /test where resource leaks are not really an issue.

But indeed, the coverity scan has uncovered quite a few (yes, plenty) issues. Thanks @abierman for pointing this out!

@obgm
Copy link
Owner

obgm commented Dec 2, 2016

After having fixed all but one defect (some dead code in client.c), I close this issue for now.
Most of the leaks detected with default aggressiveness of the coverity analysis tool have been in the unit tests where they do not harm, the core library had only one leak in a corner case that usually does not occur (because the application would not do anything useful in that case...)
Zero uses of NULL pointers were detected.

@obgm obgm closed this as completed Dec 2, 2016
@abierman
Copy link
Author

abierman commented Dec 2, 2016 via email

@obgm
Copy link
Owner

obgm commented Dec 5, 2016

Yes, indeed. Re-opening....

@obgm obgm reopened this Dec 5, 2016
@obgm
Copy link
Owner

obgm commented Jan 6, 2017

After having checked every occurrence of coap_opt_value() and coap_opt_length() (including macros) in the core library and the examples, I still see no problem. Your scan results seem to be false positives, I presume.
(Unfortunately, I cannot reproduce those results as the free web service does not allow changing the analyzer aggressiveness.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants