From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71171f53c22d92b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-28 06:01:41 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer2.atl.newshosting.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!uunet.MISMATCH!ash.uu.net!spool.news.uu.net!not-for-mail Date: Fri, 28 Nov 2003 09:01:10 -0500 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: C's trikery semantic opens up backdoor in new Linux kernel References: <3FB1A63C.9080200@nowhere.com> <7uqlrv4l846co3ear20eotlkaj2t6aioho@4ax.com> <27427869.cO6lCOVPY8@linux1.krischik.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1070028071.92808@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@aphelion.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1070028071 14073 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:3026 Date: 2003-11-28T09:01:10-05:00 List-Id: Dave Thompson wrote: > you can accomplish the same thing by writing out (desired declarations etc. > from) the contents of the include-d file changed as specified. Note that a Standard C++ compiler is not required to represent such a modified structure in the same way as the original. If the class name for the modified class is the same as the original, and the program includes both, the behavior is undefined. If you attempt to examine an object of the original type using a pointer to the new type, the behavior is undefined. In Standard C++, the technical meaning of "undefined behavior" is that if an operation with undefined behavior is ever encountered by a program, the behavior of the entire program is completely unspecifed by the standard, even for things that happen before that operation. Violating the One-Definition Rule (that is, the definition of a type or function must be exactly the same throughout an entire program, when the language permits a definition to appear more than once) makes a program undefined as well.