Data Reference Errors
- Are all variables properly initialized? (are all instance variables initialized in all constructors?)
- Do all pointers have a legal value? (i.e. NULL or pointing to a valid location)
- Are pointers tested on being NULL where necessary?
- Alias problems? (e.g. several pointers pointing to the same object)
- Are there any off-by-one errors? (e.g. strings without terminating EOS byte)
- Could range bound errors occur? Eg: int array[max]; array[max]=0;
- Is garbage collection properly implemented? (e.g: are all dynamically allocated objects (by new) eventually deallocated (by delete)?) If not, does this represent an oversight?
- Are there any scope ambiguities? Do variable declarations hide other
declarations? If yes, is this an oversight? E.g:
class C { public: C() { object* o = new object; } private: object* o; };
- (C++ experts only:) Do all base classes have a virtual destructor? If not, does this represent an oversight?