Chris H
6/14/2011 5:11:00 PM
In message <it7upn$tqq$1@dont-email.me>, Noob <root@127.0.0.1> writes
>>
>> The article is misleading as it talks about "embedded compilers" by
>> which they mean GCC.
>
>You're confusing the article and the paper.
>I counted 0 occurence of the string "embedded compiler"
>in Regehr's article.
The introduction says
//////////////////////////
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.
///////////////
and the targets were IA32, Coldfire, MSP430 and AVR
Though you are not likely to be using GCC for safety critical or mission
critical code. Certainly not on the higher SIL levels.
But I do continually hear, due to this report, that "embedded compilers
don't handle volatile correctly" normally when referring to compilers
that were not referenced in the report and do handle volatile correctly.
>IIUC, you dispute the conclusion of their 2008 paper, because
>their study didn't include several widely-used compilers?
Well.... To be blunt it only really tested one. Variants of GCC.
>Can you name these compilers?
No I was/am under NDA when we did the testing but it was for safety
critical use.
>Are they available at no cost
>for academic research?
So it is research on compilers they "can get for free?" Though I do
take your point that it is difficult to test compilers when you have to
buy them as they are not cheap.
On the other hand as most of the commercial compilers are heavily and
rigorously tested internally what is the advantage in letting a bunch of
academics have them?
In which case the report should have been entitled "GCC Volatiles Are
Miscompiled, and What to Do about It"
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/