![]() |
От: |
Nuzhny
|
https://github.com/Nuzhny007 |
Дата: | 26.05.11 06:48 | ||
Оценка: |
__declspec(dllexport) void dll_func(void* vec);
#include <vector>
void dll_func(void* vec)
{
std::vector<int>* v = (std::vector<int>*)vec;
std::vector<int>& vv = *v;
vv.resize(100);
}
#include <vector>
void f()
{
std::vector<int> v;
dll_func(&v);
}
int _tmain(int argc, _TCHAR* argv[])
{
f();
return 0;
}
Invalid address specified to RtlValidateHeap( 002B0000, 00CF1328 )
Windows has triggered a breakpoint in dll_test.exe.
This may be due to a corruption of the heap, which indicates a bug in dll_test.exe or any of the DLLs it has loaded.