I've tested this with irr::core::list, irr::core::map, irr::core::array, and irr::core::stringc and get the same issue. In contrast, I've also tested it with irr::u32 and there's no problems.
Here is my setup: Mixed mode C++/CLI project in Visual Studio 2008 and an AQTime profiling project set to the Allocation profiler, with the option "Check Memory Bounds" turned on.
Code to replicate the issue:
Code: Select all
#include <windows.h>
#include "irrlicht.h"
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
irr::core::list<int> *l = new irr::core::list<int>();
delete l;
return 0;
}
Code: Select all
irr::u32 *l = new irr::u32();
Is there some fancy allocation/deallocation process being used by Irrlicht that could be affecting AQTime's methods of detecting boundary overwriting?
A quick rundown of how AQTime does boundary checking (also available in more detail in their help file) is that it hooks calls to allocation functions and actually allocates 8 additional bytes, 4 at the beginning, and 4 at the end, which it fills with it's own signatures, but only reports back the original amount of bytes requested by the application to use. If the application writes past the beginning/end of the block of memory, AQTime notices because it's signature will be changed, so it reports back that something has written outside of it's boundaries.
Edit: I just tested this again with irr::video::SMaterial, and I have the same problem, so that blows the templates idea out of the water. Any ideas?