MemLeakDetect.h defines a constant MLD_MAX_TRACEINFO which sets the size of the stack trace buffer.
If the stack trace for a memory allocation exceeds this then the CMemLeakDetect::symStackTrace2 method will overrun the buffer, resulting in difficult to locate memory corruption problems.
This problem only affects debug builds that enable MemLeakDetect.
Comments: ** Comment from web user: sleschinski **
If the stack trace for a memory allocation exceeds this then the CMemLeakDetect::symStackTrace2 method will overrun the buffer, resulting in difficult to locate memory corruption problems.
This problem only affects debug builds that enable MemLeakDetect.
Comments: ** Comment from web user: sleschinski **
Reviewing it before v4.9.3 beta release: I currently use commercial Deleaker tool which is superior to what MemLeakDetect can offer. Also I added configuration for Visual Leak Detector which can work with /MD build. Building a /MDd is somewhat problematic considering that GDAL should be built with this option to. So generally MemLeakDetect isn't our tool of choice any more. I haven't removed the includes from the source though, they are still there if _DEBUG flag is defined. I've just changed MLD_MAX_TRACEINFO from 256 to 512, to close this issue. Though I can't quite imagine, why so large stack size is needed.