Sujet : Re: A Famous Security Bug
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 23. Mar 2024, 17:51:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <utnt30$3v0ck$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla Thunderbird
On 3/23/24 12:07, Kaz Kylheku wrote:
On 2024-03-23, David Brown <david.brown@hesbynett.no> wrote:
...
That is true - /if/ you make the restriction that the translation unit
is complied completely to linkable machine code or assembly, and that it
is not changed in any way when it is combined into the new program.
Such a setup is common in practice, but it is in no way required by the
C standards and does not apply for more advanced compilation and build
scenarios.
Well, it's only not required if you hand-wave away the sentences in
section 5.
Or, you could read the whole of section 5. 5.1.2.3p6 makes it clear that
all of the other requirements of the standard apply only insofar as the
observable behavior of the program is concerned. Any method of achieving
observable behavior that matches the behavior that would be permitted if
the abstract semantics were followed, is permitted, even if the actual
semantics producing that behavior are quite different from those specified.