Commit 96c9b0fb authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Fixed a memory leak in virtual destructor tests.

parent 0609fccf
...@@ -96,6 +96,7 @@ static /*basic_ostringstream_char*/void* (__thiscall *p_basic_ostringstream_char ...@@ -96,6 +96,7 @@ static /*basic_ostringstream_char*/void* (__thiscall *p_basic_ostringstream_char
/*basic_ostringstream_char*/void*, int, /*MSVCP_bool*/int); /*basic_ostringstream_char*/void*, int, /*MSVCP_bool*/int);
static void (__thiscall *p_basic_ostringstream_char_dtor)(/*basic_ostringstream_char*/void*); static void (__thiscall *p_basic_ostringstream_char_dtor)(/*basic_ostringstream_char*/void*);
static void (__thiscall *p_basic_ostringstream_char_vbase_dtor)(/*basic_ostringstream_char*/void*); static void (__thiscall *p_basic_ostringstream_char_vbase_dtor)(/*basic_ostringstream_char*/void*);
static void (__thiscall *p_basic_ios_char_dtor)(/*basic_ios_char*/void*);
static int invalid_parameter = 0; static int invalid_parameter = 0;
static void __cdecl test_invalid_parameter_handler(const wchar_t *expression, static void __cdecl test_invalid_parameter_handler(const wchar_t *expression,
...@@ -223,6 +224,8 @@ static BOOL init(void) ...@@ -223,6 +224,8 @@ static BOOL init(void)
"??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ"); "??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ");
SET(p_basic_ostringstream_char_vbase_dtor, SET(p_basic_ostringstream_char_vbase_dtor,
"??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ"); "??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ");
SET(p_basic_ios_char_dtor,
"??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ");
} else { } else {
SET(p_char_assign, "?assign@?$char_traits@D@std@@SAXAADABD@Z"); SET(p_char_assign, "?assign@?$char_traits@D@std@@SAXAADABD@Z");
SET(p_wchar_assign, "?assign@?$char_traits@_W@std@@SAXAA_WAB_W@Z"); SET(p_wchar_assign, "?assign@?$char_traits@_W@std@@SAXAA_WAB_W@Z");
...@@ -258,6 +261,8 @@ static BOOL init(void) ...@@ -258,6 +261,8 @@ static BOOL init(void)
"??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ"); "??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ");
SET(p_basic_ostringstream_char_vbase_dtor, SET(p_basic_ostringstream_char_vbase_dtor,
"??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ"); "??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ");
SET(p_basic_ios_char_dtor,
"??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ");
} }
init_thiscall_thunk(); init_thiscall_thunk();
...@@ -503,8 +508,10 @@ static void test_virtual_base_dtors(void) ...@@ -503,8 +508,10 @@ static void test_virtual_base_dtors(void)
call_func3(p_basic_ostringstream_char_ctor_mode, this, 0, 1); call_func3(p_basic_ostringstream_char_ctor_mode, this, 0, 1);
call_func1(p_basic_ostringstream_char_vbase_dtor, this); call_func1(p_basic_ostringstream_char_vbase_dtor, this);
/* this test uses vbtable set by earlier test */
call_func3(p_basic_ostringstream_char_ctor_mode, this, 0, 0); call_func3(p_basic_ostringstream_char_ctor_mode, this, 0, 0);
call_func1(p_basic_ostringstream_char_dtor, this+basic_ostringstream_char_vbtable[1]); call_func1(p_basic_ostringstream_char_dtor, this+basic_ostringstream_char_vbtable[1]);
call_func1(p_basic_ios_char_dtor, this+((int**)this)[0][1]);
} }
START_TEST(misc) START_TEST(misc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment