Re: How to test whether strstr() returns a null pointer or not?



"Keith Thompson" <kst-u@xxxxxxx> wrote
>
>>>> A window popped up asking for permission to report the problem to
>>>> Microsoft. That's how I knew something was wrong. Anyway, since
>>>> the program is working now, I'll just leave the mistery behind and
>>>> forget about it.
>>>
>>> It's very likely that the error was a symptom of a deeper problem
>>> that's going to bite you again later on. The change you made should
>>> not have made any difference. It's up to you whether you want to
>>> spend time tracking it down, but I'd advise doing so.
>>>
>> The bug is in the compiler. That's why MS want a bug report.
>
> Is it? Does the "report the problem to Microsoft" message reliably
> indicate a bug in Microsoft's compiler, or could it be triggered by a
> bug in the program itself? (I have no idea what the answer to that
> question is.)
>
A bit OT, but yes.
Microsoft aren't interested if a developer has introduced a bug into his
program, except that obviously the compiler produces a diagnostic if
possible.
However they are interested if their own compiler / ide / debugger isn't
working. The message indicates that their program has encountered an
internal error, i.e. is bugged. (If it wasn't bugged before it popped up the
message box, it is bugged after).
That bug could be triggered by attempting to compile a legal program, or it
could be triggered by an illegal program. Either way it is Microsoft's
fault.
>
> If it's the result of undefined behavior in the program, recompiling
> with another compiler coud very well *seem* to correct the problem.
>
What I should have asked if whether the message appears at compile time or
run time. If it appears when the program is run under the debugger it is
probably a bug in the debugger rather than the compiler itself. It could
indeed be because the debugger cannot cope with undefined behaviour.
You are right that compiling on another compiler may mask the error. Once
your tool stop working reliably it is hard to know what to do.


.



Relevant Pages

  • Re: Text box throws an Error 7 Out of Memory with less than 27K in it!
    ... I'd have to agree with Bob here, ... >> those exact numbers and then concatenates that many more, ... I used to work supercomputer compiler support at CDC. ... > My favorite such bug at CDC was a benchmark that ran instantaneously. ...
    (microsoft.public.vb.enterprise)
  • Re: Bug in latest IAR MSP430 compiler optimization???
    ... It has been assigned bug id EW20095, and it will be fixed in the ... The tests compiler companies do are quite extensive. ... register allocation when combined with post-incs and rollup. ... IAR use an industry standard test suite like this (that you don't ...
    (comp.arch.embedded)
  • Re: Wrong optimisation in Visual C++.net Release Build
    ... It's not a compiler bug; it's bad code that relies on undefined behavior. ... evaluation of arguments for a function call. ...
    (microsoft.public.vc.language)
  • Re: Salford compiler: Assigning a value to a constant expression is invalid
    ... a bug, it is not usually wise, I think, to assume that it's a compiler bug. ... -|> I'd suggest submitting a self-contained source code file to Salford Support. ... So all I had to do in that case was send the routine and ...
    (comp.lang.fortran)
  • Re: Another computer algebra system : smib
    ... Certainly sometimes a bug is discovered only after a program is ported to a new environment -- a bug that existed in the old environment too, but just had not been exercised. ... Spending time porting a program is ... If the code is a command line drive program, then there should be few differences between for platform A and code for platform B. If one uses portable thread libraries, then if code breaks on platform B, but not on A, I would certainly think it is worth while spending time on platform B to find the problem, as it is highly likely to be a logical error in the program. ... The fact this is new code, I would not release it with over 1600 warnings messages from the compiler. ...
    (sci.math.symbolic)

Loading