[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is GCC really wrongly optimizing code leading to several bugs and vulnerabilities?

On Sun, 24 Nov 2013, Thomas Goirand wrote:
> I haven't checked for these facts myself due to lack of time, which is
> why I just post here. I think this paper is interesting anyway, and
> worth sharing.

I read that paper sometime ago, and as far as I recall, it mostly deals with
C code that has undefined behavior by the spec, so it is not about gcc doing
things wrong.

It is about C being an extremely hard language to get right, because it has
a ton of "undefined" situations way too many C coders are not aware of, nor
paying sufficient attention to.

Obviously, the results of a C statement depending on undefined behavior can
change when the compiler, compiler version, or optimization level changes.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: