Errors - data handling, race conditions

ERRORS IN HANDLING OR INTERPRETING DATA

Problems when passing data between routines
  • Parameter list variables out of order or missing
  • Data type errors
  • Aliases and shifting interpretations of the same area of memory
  • Misunderstood data values
  • Inadequate error information
  • Failure to clean up data on exception-handling exit
  • Outdated copies of data
  • Related variables get out of synch
  • Local setting of global data
  • Global use of local variables
  • Wrong mask in bit field
  • Wrong value from a table
Data Boundaries
  • Unterminated null terminated strings
  • Early end of string
  • Read/write past end of a data structure, or an element in it
Read outside the limits of a message buffer
  • Compiler padding to word boundaries
  • Value stack under/overflow
  • Trampling another process' code or data
Messaging Problems
  • Messages sent to wrong process or port
  • Failure to validate an incoming message
  • Lost or out of synch messages
  • Message sent to only N of N+1 processes
Data Storage Corruption
  • Overwritten changes
  • Data entry not saved
  • Too much data for receiving process to handle
  • Overwriting a file after an error exit or user abort

RACE CONDITIONS
  • Races in updating data 

  • Assumption that one event or task has finished before another begins
  • 
Assumption that input won't occur during a brief processing interval 

  • Assumption that interrupts won't occur during a brief interval 

  • Resource races: the resource has just become unavailable 

  • Assumption that a person, device, or process will respond quickly
  • 
Options out of synch during a display change
  • 
Task starts before its prerequisites are met 

  • Messages cross or don't arrive in the order sent