[Cryptography] GCC bug 30475 (was Re: bounded pointers in C)

Nemo nemo at self-evident.org
Sun Apr 20 21:38:57 EDT 2014


Some years ago, I put a sign above my monitor that reads, in large block
letters, "DO NOT CORRECT PEOPLE ON THE INTERNET".

But what the heck, it's a holiday.

Arnold Reinhold <agr at me.com> writes:

> the GCC team was informed that the GCC complier in its common mode of
> operation is, without any warning, removing safety checks

Guess what? _Every_ modern C compiler will "remove" the same "safety
checks".

See for yourself. Browse to here:

http://goo.gl/lwpx4D

...and select a compiler, any compiler, from the drop-down menu at the
upper right. Stare at the assembly and see if you can find the
"assert()".

Every modern compiler does this because IT IS NOT A VALID SAFETY
CHECK. It has never been a valid check, in any version of C, since at
least 1989. If you do not know this, then you do not know C.

As an aside, one compiler is kind enough to warn about this invalid code
if you ask it to:

http://goo.gl/Ektg8W

Developers who cannot handle the semantics of the language can paper
over their (broken code / lack of understanding) with "-fwrapv" and
"-fno-delete-null-pointer-checks" and "-fno-strict-alias" and so forth,
but honestly, it is probably better for all concerned if they simply
switch to a "safety-scissors and sippy-cups" language like C# or Java or
whatever.

> In my opinion, the GNU Project and the developers of GCC would be well
> advised to get legal advice on their responsibilities and liabilities
> in this matter.

Have no fear; I am quite confident the GCC developers will give your
opinion all of the consideration it is due.

 - Nemo
   https://self-evident.org/


More information about the cryptography mailing list