Sujet : Re: Computer architects leaving Intel...
De : jgd (at) *nospam* cix.co.uk (John Dallman)
Groupes : comp.archDate : 30. Aug 2024, 20:38:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <memo.20240830203812.19028A@jgd.cix.co.uk>
References : 1
In article <jwv7cbxq2xb.fsf-monnier+
comp.arch@gnu.org>,
monnier@iro.umontreal.ca (Stefan Monnier) wrote:
Other than using CompCert, I don't know of any reliable way for
a programmer to make sure his C code does not suffer from UB.
That looked very interesting for a few minutes. If CompCert could warn
about undefined behaviour reasonably reliably, I'd be very interested in
using it as a specialised lint program.
As far as I can see from the documentation, the C interpreter that comes
with it can do that, but that's not very practical with millions of lines
of source.
because all too often it's virtually impossible for the tools to
understand that this particular code can/will hit UB.
Presumably this is often impractical for a compiler, and run-time
checking is required? I gave Clang's Undefined Behaviour Sanitizer a try
a few weeks ago, and must get back to it.
John