We grouped the diagnostic, so that you can get the general idea of what PVS-Studio is capable of.
As it is hard to do strict grouping, some diagnostics belong to several groups. For example, the incorrect condition "if (abc == abc)" can be interpreted both as a simple typo, but also as a security issue, because it leads to the program vulnerability if the input data are incorrect.
Some of the errors, on the contrary, couldn't fit any of the groups, because they were too specific. Nevertheless this table gives the insight about the functionality of the static code analyzer.
|Main PVS-Studio diagnostic abilities||C, C++ diagnostics||C# diagnostics|
|64-bit issues||V101-V128, V201-V207, V220, V221, V301-V303||-|
|Check that addresses to stack memory does not leave the function||V506, V507, V558, V758||-|
|Arithmetic over/underflow||V636, V658||V3040, V3041|
|Array index out of bounds||V557, V582, V643||V3106|
|Check for double-free||V586, V749||-|
|Dead code||V606, V607||-|
|Unreachable code||V551, V695, V734||-|
|Uninitialized variables||V573, V614, V679, V730, V737||V3070|
|Unused variables||V603, V751, V763||V3061, V3065, V3077|
|Illegal bitwise/shift operations||V610, V629, V673, V684||-|
|Undefined/unspecified behavior||V567, V610, V611, V681, V704, V708, V726, V736||-|
|Incorrect handling of the types (HRESULT, BSTR, BOOL, VARIANT_BOOL)||V543, V544, V545, V716, V721, V724, V745, V750, V676, V767||-|
|Improper understanding of function/class operation logic||V518, V530, V540, V541, V554, V575, V597, V598, V618, V630, V632, V663, V668, V698, V701, V702, V717, V718, V720, V723, V725, V727, V738, V742, V743, V748, V762, V764||V3010, V3057, V3068, V3072, V3073, V3074, V3082, V3084, V3094, V3096, V3097, V3102, V3103, V3104, V3108|
|Misprints||V501, V503, V504, V508, V511, V516, V519, V520, V521, V525, V527, V528, V529, V532, V533, V534, V535, V536, V537, V539, V546, V549, V552, V556, V559, V560, V561, V564, V568, V570, V571, V575, V577, V578, V584, V587, V588, V589, V590, V592, V600, V602, V604, V606, V607, V616, V617, V620, V621, V622, V625, V626, V627, V633, V637, V638, V639, V644, V646, V650, V651, V653, V654, V655, V660, V661, V662, V666, V669, V671, V672, V678, V682, V683, V693, V715, V722, V735, V747, V754, V756, V765, V767||V3001, V3003, V3005, V3007, V3008, V3009, V3011, V3012, V3014, V3015, V3016, V3020, V3028, V3029, V3034, V3035, V3036, V3037, V3038, V3050, V3055, V3056, V3057, V3062, V3063, V3066, V3081, V3086, V3091, V3092, V3107, V3109|
|Missing Virtual destructor||V599, V689||-|
|Coding style not matching the operation logic of the source code||V563, V612, V628, V640, V646, V705||V3018, V3033, V3043, V3067, V3069|
|Copy-Paste||V501, V517, V519, V523, V524, V571, V581, V649, V656, V691, V760, V766||V3001, V3003, V3004, V3008, V3012, V3013, V3021, V3030, V3058|
|Incorrect usage of exceptions||V509, V565, V596, V667, V740, V741, V746, V759||V3006, V3052, V3100|
|Buffer overrun||V512, V514, V594, V635, V641, V645, V752, V755||-|
|Security issues||V505, V510, V511, V512, V518, V531, V541, V547, V559, V560, V569, V570, V575, V576, V579, V583, V597, V598, V618, V623, V642, V645, V675, V676, V724, V727, V729, V733, V743, V745, V750||V3022, V3023, V3025, V3027, V3053, V3063|
|Operation priority||V502, V562, V593, V634, V648||-|
|Null pointer pointer/null reference dereference||V522, V595, V664, V757||V3019, V3042, V3080, V3095, V3105|
|Unchecked parameter dereference||V595, V664||V3095|
|Synchronization errors||V712||V3032, V3054, V3079, V3083, V3089, V3090|
|WPF usage errors||-||V3044 - V3049|
|Check for integer division by zero||V609||V3064|
|Customized user rules||V2001-V2013||-|
Table – PVS-Studio functionality.
As you see, the analyzer is especially useful is such spheres as looking for bugs caused by Copy-Paste and detecting security flaws.
To these diagnostics in action, have a look at the error base. We collect all the errors that we have found, checking various open source projects with PVS-Studio.