Re: Code Alignment Problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: cristalink (cristalink_at_nospam.nospam)
Date: 02/04/05


Date: Sat, 5 Feb 2005 11:19:23 +1300

You were clear enough. A small change in your source code may cause
significant changes in the assembly output, which in turn may cause a bug to
show up.

I also mentioned the possibility of a timing problem. Add
KeDelayExecutionThread with a zero wait interval before your code that
accesses the file system. Check if your code fails. Now increase the
interval to say 5 seconds and see what happens.

-- 
http://www.firestreamer.com - NTBackup to DVD and DV
"Ken Allen" <kendrhyd@sympatico.ca> wrote in message
news:utnaE5vCFHA.2756@TK2MSFTNGP12.phx.gbl...
> cristalink wrote:
> > The environment does not really matter. The code generated by the
compiler
> > is substantially different in debug and release modes. Most likely you
have
> > a bug in your code, such as an uninitialized variable etc. There's a
chance
> > you encountered a bug in the compiler or a timing problem.
> >
> > Review your code. Run Prefast from the latest DDK on your sources. Try
> > Driver Verifier. Usually, you need to understand the assembly code to
track
> > down such a bug. If you cannot read assembly code, you better hire an
> > expert.
> >
>
> Perhaps I was not clear -- the ability to make the problem disappear and
> reappear by the addition and removal of debug code exists in the debug
> build only. IN one debug build the problem will exist; if I add some
> additional statements, the problem does not manifest itself!
>
> -Ken


Relevant Pages

  • Debug help please...
    ... I have just discovered a bug in my application. ... the debug version, so the release version is fine. ... The output window is pretty long, so I have included it at the end of this ... Binary was not built with debug information. ...
    (microsoft.public.vc.mfc)
  • Re: Debug help please...
    ... The release version is also broken, but unlike the debug version, IT DOES ... So you find and fix the bug. ... The output window is pretty long, so I have included it at the end of this ... Binary was not built with debug information. ...
    (microsoft.public.vc.mfc)
  • Re: [off topic]Strange Behaviour -- adding printf change the progra execution
    ... i just simply adding few debug like below and it changes program ... and a corresponding delay in the execution of other ... The problem is, if you've got a bug in your code, it has a pretty good ... source code, making it harder to detect the real defect. ...
    (comp.lang.c)
  • Re: trouble creating array of objects
    ... >> might try refactoring, but I would preserve the original in case I had ... > is debugging as in getting the bugs out, ... it was so badly written that it was effectively impossible to debug. ... The bug ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Real pain with SegFoult
    ... It is obvious that real bug have place ... This kind of bugs are just a bit more difficult to debug ... always works fine at home but on Solaris it gives me Seqmentation Foults ... I have used a debugger a lot. ...
    (comp.lang.c)