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?

  1. AA function that users really need has been left out of the requirements document
  2. BPaths that read an uninitialized variable, and places that may access an array out of bounds
  3. 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.
Practice this topic Back to topic

Related calculators

Books on Software Development and Project Management Ad

As an Amazon Associate I earn from qualifying purchases.

More Software Development and Project Management questions

  1. Which describes black-box testing?
  2. An input field accepts only integers; values from 1 to 100 inclusive are accepted and all others cause an error. When the input is divided by equivalence partitioning, how many equivalence classes are there in total (valid and invalid classes combined)?
  3. A program sets the admission fee by age (an integer of 0 or more): ages 0 to 17 pay the child fee, 18 to 64 the adult fee, and 65 or older the senior fee. Which set of test values is most appropriate for boundary value analysis to check the boundaries where the fee category changes?
  4. The specification says 'issue a warning if the temperature is 85 °C or higher', but the firmware mistakenly contains 'if (t > 85)'. The temperature t is an integer. Which of the following test values can detect this error?
  5. The values of temp and err can be chosen independently of each other. For the code 'if (temp > 80) { fan = HIGH; } else { fan = LOW; } if (err) { log(); }', what is the minimum number of test cases needed to achieve statement coverage (executing every statement at least once)?