| Summary: | Checking the code of Valgrind dynamic analyzer by a static analyzer | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Andrey Karpov <karpov> |
| Component: | general | Assignee: | Julian Seward <jseward> |
| Status: | REPORTED --- | ||
| Severity: | minor | CC: | philippe.waroquiers, rhyskidd |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Andrey Karpov
2017-05-04 09:07:57 UTC
Can you make a patch that fixes at least the more obvious problems (the ?: precedence ones in particular) ? Yes, we can make patches, but I think it's not a very good idea. We don’t know the code much and can fix it incorrectly. And we have no opportunity to deal with every warning in detail. We regularly write articles about various projects, and we just don't have enough time to create such a large number of patches. Let me explain this with numbers. Now we have 11037 errors in the base ( https://www.viva64.com/en/examples/ ). If we start making patches for all of them, we’ll have to hire a whole new team for this. We aren’t that rich yet to do it. :) P.S. If you want, I could give a PVS-Studio license for Valgrind Team. I should warn right away, that there will be a lot of false positives. Most of all they will be caused by active usage of macros. If you are interested, contact me at karpov[@]viva64.com. Thanks for reporting these suspicious pieces of code. I fixed 2 of the reported errors: - (info = NULL ? "" : info)); + (info == NULL ? "" : info)); and - taken_Jccs, taken_Jccs * 100.0 / total_Jccs ?: 1); + taken_Jccs, taken_Jccs * 100.0 / (total_Jccs ? total_Jccs : 1)); in revision 16379. Keeping the bug opened, as other reported problems still to be looked at. Thanks Andrey. viva64 have some good tools that have helped in the past. |