Winner of the 2015 Underhanded C Contest Announced (underhanded-c.org)
Xcott Craver writes: The Underhanded C contest results have now been announced. This time the contest challenge was to cause a false match in a nuclear inspection scenario, allowing a country to remove fissile material from a warhead without being noticed. The winner receives $1000 from the Nuclear Threat Initiative.
they should get something?
with -Wall -Werror ?
NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
As in the chiptune dude? Can anybody confirm it's the same guy?
That's a highly specific thing ... who funded this again? :-P
Lost at C:>. Found at C.
Do not use common function names when defining new function. This would be caught simply by insisting that the function is already named, and thus being sent back the the programmer to rename it something else.
Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
Now we know what really took place at Volkswagen and the rigged emissions. Underhanded C!
typedef double float_t;
Nice solution, but I'm not sure it would not get detected with proper coding standard, peer reviews, and testing. But it would depend on a human factor. Plus compiler would likely give a warning for overriding a typedef.
I've enjoyed these over the years. My personal favorite was the "English to Pig Latin" translator whose source code looked like ASCII Art for a pig.
But really, if you can do stuff like that, you can do pretty much anything. So what's the point, really? Where's the challenge?
A much more interesting contest would be to write C code that's simple and understandable. Yes, I said it, simple and understandable and in C. There's a challenge to bend the minds of the world's greatest programmers.
Yes, -Wall is good way to find code smells.
For obfuscated code, I suggest -Larry -Wall.
The stupid thing is that C++ name mangling would already catch this problem at link time, and every modern C/C++ compiler already has code to support this, except that it's only activated for the much loved/unloved function overloading.
If GCC/clang in C mode generated mangled names into object files when compiling C programs (as purely informative records), the linker could diagnose this kind of problem as optional linkage errors—mighty darn useful, optional linkage errors.
This is a violation of the type system pure and simple, but one that doesn't compromise any specific compilation unit. That leaves the linker as the next line of defense, but like to keep our C linkers in dark boxes full of trust-me horse shit.
> The Underhanded C contest results have now been announced. This time the contest challenge was to cause a false match in a nuclear inspection scenario, allowing a country to remove fissile material from a warhead without being noticed.
Did you know the USA spent ~50M dollars to attack the DPRK's nuclear bomb programme with a modified version of Stuxnet? They failed because the computers CIA strategically placed for North Korea to buy ended up not in the uranium enrichment bunkers but in Kim's office (where they were used to review pornography in order to protect the glorious communist morals of the population).
Thereby the award is officially assigned to the DPRK. Juche Korea!