[shell-coding] Re: Bad Pointer errors all over the place

  • From: "Brandon Sneed" <bsneed@xxxxxxxxx>
  • To: <shell-coding@xxxxxxxxxxxxx>
  • Date: Thu, 24 Oct 2002 10:36:19 -0500

I should've mentioned this before, but i found BC7 to be rather buggy
compared to the BC6.  One thing i've noticed and this may not be true for
everyone, is that when using SaveDC/RestoreDC it screams about resource
leaks when in fact there are none.  My statement to Daij-Djan still holds
true, in that it does a great job at finding stuff, so good in fact it even
grabs stuff that isn't a problem.

BC *SHOULD* pick up unreleased COM objects, i know BC6 did, haven't had an
opportunity to try in BC7 though.  It could be another setting.

----- Original Message -----
From: "Kevin Schaffer" <kschaffe@xxxxxxxx>
To: <shell-coding@xxxxxxxxxxxxx>
Sent: Thursday, October 24, 2002 10:27 AM
Subject: [shell-coding] Re: Bad Pointer errors all over the place


> It might have to do with the fact that BSTRs store the length
> before the string data. If SysAllocString gives you a pointer
> p, then the BSTR really starts at p - 4, which is a 32-bit length.
> This might confuse Boundschecker, although you'd think it
> would be designed to handle that since BSTRs are so
> common.
>
> --
> Kevin Schaffer
>
>
> Daij-Djan wrote:
>
> >Geoshell 6 is 'leaking' memory and GDI resources. To find out why/how
> >and when, I got a trial of Boundschecker 7. Unfortunately, the results
> >have only further confused me.
> >No memory is leaked and no GDI resources are lost!?
> >The only errors Boundschecker finds concern freeing strings.
> >We use CComBSTR  and CComVariant and whenever a BSTR is freed
> >Boundschecker reports a:
> >
> >Bad Pointer: 0x3A6AE8C passed to SysFreeString. In CComBSTR::Empty() or
> >in CComVariant::Clear()
> >
> >The error occurs x thousand times, depending on how long you run the
> >program. It happens in any function and at any time.
> >The BSTR is a valid 0 terminated string... I don't have any idea of what
> >the stupid program thinks we're doing wrong. :)
> >
> >
> >
> >__________________________________________________
> >Subscription options and archive:
> >//www.freelists.org/list/shell-coding
> >
> >
> >
> >
>
>
> __________________________________________________
> Subscription options and archive:
> //www.freelists.org/list/shell-coding


__________________________________________________
Subscription options and archive:
//www.freelists.org/list/shell-coding

Other related posts: