Quantcast
Channel: Visual Leak Detector for Visual C++ 2008-2015
Viewing all articles
Browse latest Browse all 704

New Post: infinite loop initializing vld, trying to check leaks in a Maya plugin

$
0
0
Hello,

I'm trying to leak-check a Plugin dll I wrote. The issue I get looks a lot like discussion:224047 and discussion:266691.

I'm using: 2.3, compiled in Release Mode, using dbghlp.dll that comes with windows 8.1. VLD is directly added as a subproject in my solution, it gets build as a static lib and linked directly into my dll.

After a few first troubles of google::protocolbuffers being initialized first (and by that using new-operators from vld with vld not even being initialized), I inserted #pragma init_seg (compiler) into Line #60 of vld.cpp - then it works: the vld instance is initialized first.

Now comes the infinite loop: the call attachToLoadedModules(newmodules); in vld's cTor, indirectly calls _HeapAlloc. Inside _HeapAlloc the first line of code
LPVOID block = HeapAlloc(heap, flags, size);
creates the infinite loop, as somehow this call produces another call to _HeapAlloc.

Any idea how to fix this? Any more information I should provide?

Cheers,
Stefan

Viewing all articles
Browse latest Browse all 704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>