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

Fix various issues reported by PVS-Studio analysis #4942

Merged
merged 9 commits into from
Aug 20, 2020

Conversation

pbalcer
Copy link
Member

@pbalcer pbalcer commented Aug 19, 2020

Thanks to Andrey Karpov and PVS-Studio for doing a thorough analysis of PMDK:
https://viva64.com/en/b/0756/

Even though we run two different static analysis tools and many runtime checkers, PVS-Studio managed to catch a couple of issues. The good news is that most of the problems were in tests or examples.

I didn't address the missing memory allocation error handling because while I 100% agree that library code should definitely handle all possible recoverable errors correctly, we usually omi extraneous error handling in tools/tests or benchmarks for the sake of brevity.


This change is Reviewable

Reported-by: Andrey Karpov <karpov@viva64.com>
Reported-by: Andrey Karpov <karpov@viva64.com>
Reported-by: Andrey Karpov <karpov@viva64.com>
@pmem-bot
Copy link
Contributor

@janekmi and @Greg091 please review this pull request

Reported-by: Andrey Karpov <karpov@viva64.com>
Reported-by: Andrey Karpov <karpov@viva64.com>
Reported-by: Andrey Karpov <karpov@viva64.com>
Reported-by: Andrey Karpov <karpov@viva64.com>
Reported-by: Andrey Karpov <karpov@viva64.com>
Reported-by: Andrey Karpov <karpov@viva64.com>
@codecov-commenter
Copy link

Codecov Report

Merging #4942 into master will decrease coverage by 0.25%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4942      +/-   ##
==========================================
- Coverage   70.70%   70.44%   -0.26%     
==========================================
  Files         157      176      +19     
  Lines       25895    27803    +1908     
==========================================
+ Hits        18310    19587    +1277     
- Misses       7585     8216     +631     

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

Successfully merging this pull request may close these issues.

None yet

5 participants