[wdmaudiodev] Re: BSOD at driver based on MSVAD - check wrong pointer

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 21 Jan 2013 10:37:24 -0800

kachalovan@xxxxxxxxxxx wrote:
> my virtal audio microphone driver based on msvad simple sample has BSOD
> dump reports from sysdev.microsoft.com. These dumps file after analyzing
> gave information that crash occur at
> CMiniportWaveCyclicStreamMSVAD::CopyFrom method during write operation at
> RtlCopyMemory from internal audio buffer to destination client's buffer. I
> suspect that this BSOD possible after unexpected exit or crash of client
> applications.
>
> Attempts to detect wrong pointer pointer to destination buffer with using
> ProbeForWrite or MmProbeAndLockPages always gave exception result,
> included cases than pointer was valid.
>
> How to right check wrong pointer in this case?

Are you sure it's the destination address that has the issue?  CopyFrom
should be handed two kernel-mode virtual addresses.  No probing and
locking is required.

I would be more likely to guess that something in your setup is causing
your buffer address to go invalid.  Are you freeing the buffer during
your cleanup?

Can you induce this to happen in your testing?

-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: