From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb9cd,10b7a9a3731f3fc8 X-Google-Attributes: gidfb9cd,public X-Google-Thread: 1125fa,10b7a9a3731f3fc8 X-Google-Attributes: gid1125fa,public X-Google-Thread: 1164f8,10b7a9a3731f3fc8 X-Google-Attributes: gid1164f8,public X-Google-Thread: f782f,10b7a9a3731f3fc8 X-Google-Attributes: gidf782f,public From: Marc Lepage Subject: Re: Alpha Dead? Naaahhhh.... (was Re: Is there a list of Alpha NT applications anywhere?) Date: 1997/12/19 Message-ID: <349B273F.FA807605@cgocable.net>#1/1 X-Deja-AN: 308741084 Content-Transfer-Encoding: 7bit References: <34915AEE.41C6@atlas.cheme.cornell.edu> <3491F2D7.28E3@videotron.ca> <3491FFE2.E1D71B82 <67dpjo$ml9$2@willow.cc.kcl.ac.uk> Content-Type: text/plain; charset=us-ascii Organization: Infinisys MIME-Version: 1.0 Newsgroups: comp.os.ms-windows.nt.admin.misc,comp.os.ms-windows.nt.advocacy,comp.sys.dec,comp.os.ms-windows.nt.misc Nigel Arnot wrote: > Some of these errors are fundamentally undiagnosable by a compiler. > For example, suppose you have a routine in a DLL to zero out an > array, someinthing like > > void zero( char *a, int n) { while (n>0) { *a++ = 0; --n; }} > > (out of my head, so assume it's correct even if it isn't) > > and it gets called by something you are compiling that does > > zero( mystuff, m*4) > > There's absolutely no way to check when the DLL was compiled that > mystuff really is a pointer to m*4 chars, and there's no way for > what you are compiling to know that m*4 is supposed to be the size > of what mystuff is pointing at. So if you've made an error and > mystuff is pointing to the wrong place in memory or m has the > wrong value, something may get zeroed that shouldn't have been. > > In these circumstances it's quite probable that optimized and > non-optimized code will behave differently. It's my experience > that one more commonly sees a non-optimized version that "works" > become an optimized one that doesn't. This probably simply > reflects the fact that most programmers debug non-optimized > versions first, because symbolic debuggers work best that way, > and so if the bug had disrupted operation of the non-optimized > version they'd have immediately looked for a programming error. > If, however, something that has "worked" for months breaks when > optimised, they tend to want to blame the optimizer. That's just > human nature. True. But, sometimes the optimizer really is wrong. It can have a bug. It can have a bug that only I have found. It's possible, and has happened on occasion. -- SEGV