Re: Privileged Instruction exception in Release build

From: Stephen Kellett (snail_at_objmedia.demon.co.uk)
Date: 03/19/04


Date: Fri, 19 Mar 2004 13:45:43 +0000

In message <0BE41E9F-4407-49EB-85BB-7919A9CCA26C@microsoft.com>, Al
<anonymous@discussions.microsoft.com> writes
Well, the program crash was first bought to my attention by my boss after
I gave him a release build to play with on his machine. I had done most of
my testing (for want of a better word) on the debug build where the error
does not occur. And it looks now as if it is a simple access violation rather
than a restricted instruction.

Any ideas?

1) Did you do a full rebuild after changing the size of any structures
or classes? You can change the size by adding/removing data members or
virtual methods, or making an existing method virtual, or making an
existing virtual method non-virtual.

By full rebuild, I also mean full rebuild of the dependent DLLs (if
there are any) that use this class/structure.

2) Possible uninitialised memory problem, leading to data corruption,
leading to the bug

3) Possible bad message map, leading to stack corruption, leading to bug

4) Accessing deleted memory after it has been deleted, thus leading to
data corruption, thus leading to bug.

Memory Validator can help you identify 2, 3, 4.

        http://www.softwareverify.com

Take a look at the tutorials, they cover some of these topics. You may
need to switch to debug mode to check some of the errors (such as uninit
var detection).

Stephen

-- 
Stephen Kellett
Object Media Limited    http://www.objmedia.demon.co.uk
RSI Information:        http://www.objmedia.demon.co.uk/rsi.html


Relevant Pages

  • mysterious memory corruption, very confused
    ... I get random data corruption when trying to execute queries. ... This is not specific to boolean data; I have also had it happen on strings, ... I'm afraid I can't make this bug report much more useful, ... I don't know how the garbage collector works, ...
    (comp.lang.ruby)
  • Re: OT: productivity and long computing delays
    ... suggest immersing yourself in the second project during 2-hour gaps. ... (i.e. implement a new subsystem involving writing a lot). ... means I make a few small edits, then end up having to rebuild, and ... take this huge delay before I can find the next bug, ...
    (comp.lang.python)
  • Re: IOMMUs was Re: Intel vs AMD x86-64
    ... > But it caused data corruption with a few devices, in particular 3ware, so I had ... I didn't find a bug in the code. ... problem with the PCIHT bridge doing prefetches beyond iommu mapped ... and removal now:(On the other hand, we can probably do per-tag TLB ...
    (Linux-Kernel)
  • Re: [PATCH] JMicron JM20337 USB-SATA data corruption bugfix - device 152d:2338
    ... the bug is not detected as an error and incorrect data is returned, causing insidious data corruption ... the patch provides a crude workaround by detecting the error condition ...
    (Linux-Kernel)
  • Re: how do you delete an invalid argument in access
    ... This problem is the result of a data corruption, ... To rebuild your database, see the article: ... Symptom: ... As the article explains, you can rescue your data into a rebuilt table, ...
    (microsoft.public.access.formscoding)