willey@udel.edu (Edward V Willey) (08/15/90)
Help! I am having *serious* problems with my C++ compiler and was wondering if anyone out there could help me?... Let me describe a curret coding session: o I had a working program, but needed to install some changes. o I installed the changes, compiled and ran it. Seg fault. o So I commented out *all* of the changes, re-compiled and ran. Ta-dum! Another seg fault. o Then I threw in some cout/cout.flush's to localize the error. Re-compiled and bingo! The program worked *correctly*. o I then took out the cout/cout.flushes, re-compiled, and the thing still ran correctly. o So then I got bold and un-commented out my previous changes, re-compiled, and ran. Guess what? You got it--a working program. I am about to give up on this compiler. Does anyone know why it might be acting like this? -Ed Willey (willey@udel.edu) PS. Some friends and I came up with a possible reason. We believe that there is a major undocumented feature of GNU. We call it RDCI: Random Dynamic Code Interpretation. Who knows what the seed is? (it's probably random itself!)
pcg@cs.aber.ac.uk (Piercarlo Grandi) (08/18/90)
On 15 Aug 90 13:19:49 GMT, willey@udel.edu (Edward V Willey) said: willey> Help! I am having *serious* problems with my C++ compiler and willey> was wondering if anyone out there could help me?... I very much doubt the problem is serious; and most probably it is not with the compiler, or C++. willey> [ ... the description of some problem with his machine or willey> program ... ] From your report you allege that the same identical program compiled twice gives different results. You allege that this must be a fault of the compiler. This is *impossible*, because the possible causes of non deterministic behaviour by a program are; 1) The hardware is non deterministic 2) The compiler is time dependent 3) The program is time dependent I am willing to bet that 2) is not true (note that an erroneus compiler will still be deterministic, if it is not time dependent internally). If 1) is true, and you are working on stock hardware, this means that it is faulty, because stock hardware is supposed to be deterministic (or at worst slightly time dependent). willey> PS. Some friends and I came up with a possible reason. We willey> believe that there is a major undocumented feature of GNU. We willey> call it RDCI: Random Dynamic Code Interpretation. Who knows willey> what the seed is? (it's probably random itself!) So either your machine is broken, or your program is broken, or your analysis is broken (i.e. you did not compile exactly the same program). Note that the compiler is known to have bugs, but they are deterministic ones (unless Tiemann changed the implementation radically and made it time dependent). My hunch is that your analysis is broken (because you seem to ignore that most compilers, and certainly GNU C++, are deterministic in their erroneous behaviour), or failing that the machine is broken (major source of indeterminate behaviour). note: I know that non deterministic and time dependent are not the same thing, but please pass over it now; substitute 'seemingly non determinstic' above where appropriate. -- Piercarlo "Peter" Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk