Software Investigate

Volatiles Are Miscompiled, and What to Do About It

Download now Free registration required

Executive Summary

C's volatile qualifier is intended to provide a reliable link between operations at the source-code level and operations at the memory-system level. The authors tested thirteen production-quality C compilers and, for each, found situations in which the compiler generated incorrect code for accessing volatile variables. This result is disturbing because it implies that embedded software and operating systems both typically coded in C, both being bases for many mission-critical and safety-critical applications, and both relying on the correct translation of volatiles may be being miscompiled.

  • Format: PDF
  • Size: 265.7 KB