Re:Rebuild of the Debian archive with clang
by stingraycharles on Wednesday February 29, 2012 @05:21AM
(#3647285)
No one can ever prove such a thing. Neither can it be proven that gcc or any compiler for that matter produces error-free executables. What this does, however, is providing information and analysis about the quality of the clang compilation process as compared to gcc.
[ Parent
| on HN ]
Re:Rebuild of the Debian archive with clang
by ars on Wednesday February 29, 2012 @05:29AM
(#3647304)
No can prove it, but at least the GCC version are actually run by people - these version and created, but never actually used.
He should do some fuzz testing of these programs, with the exact same fuzz sent to the GCC versions, and then report any differences. But collecting the "results" would be hard - it's not always visible in output, you'd have to track system calls and IO.
Re:Rebuild of the Debian archive with clang
by rbanffy on Wednesday February 29, 2012 @08:30AM
(#3647684)
The ideal scenario would be if upstream projects provided embedded test code with standardized hooks so that tests could be built, executed and results collected in an automated way.
Even if we started with a small test set for some projects, it would be a huge win in the long run just to have this scaffolding in place.
Any ideas on how to make a distro-agnostic testing hook?
Re:Rebuild of the Debian archive with clang
by johnpaulett on Wednesday February 29, 2012 @12:57PM
(#3648857)
It does not necessarily have to be distro-agnostic.
Debian packages can already hook the upstream's test suite (e.g. via dh_auto_test).
From my (extremely limited and mostly dynamic language) Debian packaging experience, it seems that more often than not, packages do not use this existing hook. Not sure why that is though.
Re:Rebuild of the Debian archive with clang
by aidenn0 on Wednesday February 29, 2012 @12:19PM
(#3648658)
As an example, gcc generates nearly unusable code for a Via Isaiah in amd64 mode if you compile with -O1, and this has apparently been a known issue for at least 2 years.
Re:Rebuild of the Debian archive with clang
by iso8859-1 on Wednesday February 29, 2012 @06:42AM
(#3647430)
It can be proven, see CompCert C compiler: http://compcert.inria.fr/compcert-C.html.
Re:Rebuild of the Debian archive with clang
by stingraycharles on Wednesday February 29, 2012 @07:05AM
(#3647470)
That only proves that a compiler behaves according to a language definition. That does not prove the executables will behave as you expect the executables to behave, and thus there is no way knowing the executables will be error free.
Re:Rebuild of the Debian archive with clang
by Dylan16807 on Wednesday February 29, 2012 @09:20AM
(#3647858)
Frownie said error-free compilation, not error-free in all possible aspects.