I have a DLL linked to my own app that works fine when throwing from DLL to
application. But with a customer application I get a heap corruption
exception when the thrown exception goes out of scope in the catch clause.
I've copied the stack below. To the best of my knowledge, both app and DLL
are linked against the VC6 multi-threaded debug DLL runtime. Any idea
what's going wrong here?
_CrtIsValidHeapPointer(const void * 0x09b56480) line 1697
_free_dbg_lk(void * 0x09b56480, int -572662307) line 1044 + 9 bytes
_free_dbg(void * 0x09b56480, int -572662307) line 1001 + 13 bytes
operator delete(void * 0x09b56480) line 49 + 16 bytes
MSVCRTD! exception::~exception(void) + 45 bytes
AxisSafetyException::~AxisSafetyException() + 208 bytes
MSVCRTD! DestructExceptionObject(struct EHExceptionRecord *,unsigned char)
+ 85 bytes
MSVCRTD! __FrameUnwindToState + 807 bytes
MSVCRTD! __FrameUnwindToState + 458 bytes
MSVCRTD! __InternalCxxFrameHandler + 800 bytes
MSVCRTD! __InternalCxxFrameHandler + 227 bytes
MSVCRTD! __CxxFrameHandler + 44 bytes
NTDLL! 7c9037bf()
NTDLL! 7c90378b()
NTDLL! 7c90eafa()
MSVCRTD! _CxxThrowException@8 + 57 bytes