Publication Type |
Manuscript |
School or College |
College of Engineering |
Department |
Computing, School of |
Creator |
Regehr, John |
Other Author |
Eide, Eric |
Title |
Volatiles are miscompiled, and what to do about it |
Date |
2008-01-01 |
Description |
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. We 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. Our contribution is centered on a novel technique for finding volatile bugs and a novel technique for working around them. First, we present access summary testing: an efficient, practical, and automatic way to detect code-generation errors related to the volatile qualifier. We have found a number of compiler bugs by performing access summary testing on randomly generated C programs. Some of these bugs have been confirmed and fixed by compiler developers. Second, we present and evaluate a workaround for the compiler defects we discovered. In 96% of the cases in which one of our randomly generated programs is miscompiled, we can cause the faulty C compiler to produce correctly behaving code by applying a straightforward source-level transformation to the test program. |
Type |
Text |
Publisher |
Association for Computing Machinery |
First Page |
1 |
Last Page |
10 |
DOI |
http://doi.acm.org/NN.NNNN/ NNNNNNN.NNNNNNN (to be provided) |
Dissertation Institution |
University of Utah |
Language |
eng |
Bibliographic Citation |
Eide, E., & Regehr, J. (2008). Volatiles are miscompiled, and what to do about it. In Proceedings of the ACM Conference on Embedded Software (EMSOFT), 1-10. October. |
Rights Management |
(c) ACM, 2008. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in Proceedings of the Eighth ACM and IEEE International Conference on Embedded Software (EMSOFT), Atlanta, Georgia, USA, Oct. 2008, |
Format Medium |
application/pdf |
Format Extent |
788,524 bytes |
Identifier |
uspace,17475 |
ARK |
ark:/87278/s6sb4qgk |
Setname |
ir_uspace |
ID |
708000 |
Reference URL |
https://collections.lib.utah.edu/ark:/87278/s6sb4qgk |