Software Development and Project Management
When a static analysis tool is used on firmware source code, which problem is it best suited to finding without running the program?
- AA function that users really need has been left out of the requirements document
- BPaths that read an uninitialized variable, and places that may access an array out of bounds
- COn some mass-produced boards, signals are interrupted by defective solder joints
Show answer and explanation
Answer: B. Paths that read an uninitialized variable, and places that may access an array out of bounds
Static analysis examines the syntax, control flow and data flow of source code without running it, and finds problems such as reading uninitialized variables, out-of-bounds array accesses, possible null pointer dereferences and violations of coding standards (such as MISRA C, used for embedded C). It can find problems on paths that tests rarely reach, but it also produces false positives, so people review the results. Missing requirements are found through reviews and confirmation with users, and defective solder joints through inspection during manufacturing and tests on real hardware; analyzing source code cannot reveal them.
- A. Missing requirements are found by reviewing the requirements and checking with users; analyzing code cannot reveal them.
- B. Correct. They can be found without running the program by examining control flow and data flow.
- C. This is a hardware manufacturing defect, found by inspection during manufacturing and tests on real hardware.
Continue: 9 more Software Development and Project Management questions