msvcp120: Add ?_Byte_reverse_table@details@Concurrency@@3QBEB data export.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2022-01-19 19:50:34 +03:00 committed by Alexandre Julliard
parent f1dce4df90
commit 0b5e587e26
3 changed files with 28 additions and 2 deletions

View File

@ -1114,7 +1114,7 @@
@ stub -arch=win64 ?_Assign@_Concurrent_queue_iterator_base_v4@details@Concurrency@@IEAAXAEBV123@@Z
@ stub ?_Atexit@@YAXP6AXXZ@Z
@ extern ?_BADOFF@std@@3_JB std_BADOFF
# extern ?_Byte_reverse_table@details@Concurrency@@3QBEB
@ extern ?_Byte_reverse_table@details@Concurrency@@3QBEB byte_reverse_table
@ cdecl -arch=arm ?_C_str@?$_Yarn@D@std@@QBAPBDXZ(ptr) _Yarn_char_c_str
@ thiscall -arch=i386 ?_C_str@?$_Yarn@D@std@@QBEPBDXZ(ptr) _Yarn_char_c_str
@ cdecl -arch=win64 ?_C_str@?$_Yarn@D@std@@QEBAPEBDXZ(ptr) _Yarn_char_c_str

View File

@ -417,6 +417,8 @@ static void (__thiscall *p_vector_base_v4__Internal_resize)(
vector_base_v4*, size_t, size_t, size_t, void (__cdecl*)(void*, size_t),
void (__cdecl *copy)(void*, const void*, size_t), const void*);
static const BYTE *p_byte_reverse_table;
static HMODULE msvcp;
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y)
#define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0)
@ -809,6 +811,8 @@ static BOOL init(void)
SET(p__Cnd_do_broadcast_at_thread_exit,
"_Cnd_do_broadcast_at_thread_exit");
SET(p_byte_reverse_table, "?_Byte_reverse_table@details@Concurrency@@3QBEB");
hdll = GetModuleHandleA("msvcr120.dll");
p_setlocale = (void*)GetProcAddress(hdll, "setlocale");
p__setmbcp = (void*)GetProcAddress(hdll, "_setmbcp");
@ -3305,6 +3309,26 @@ static void test_vector_base_v4(void)
ok(!vector_alloc_count, "vector_alloc_count = %d, expected 0\n", vector_alloc_count);
}
static BYTE byte_reverse(BYTE b)
{
b = ((b & 0xf0) >> 4) | ((b & 0x0f) << 4);
b = ((b & 0xcc) >> 2) | ((b & 0x33) << 2);
b = ((b & 0xaa) >> 1) | ((b & 0x55) << 1);
return b;
}
static void test_data_exports(void)
{
unsigned int i;
ok(IsBadWritePtr((BYTE *)p_byte_reverse_table, 256), "byte_reverse_table is writeable.\n");
for (i = 0; i < 256; ++i)
{
ok(p_byte_reverse_table[i] == byte_reverse(i), "Got unexpected byte %#x, expected %#x.\n",
p_byte_reverse_table[i], byte_reverse(i));
}
}
START_TEST(msvcp120)
{
if(!init()) return;
@ -3350,6 +3374,8 @@ START_TEST(msvcp120)
test_vbtable_size_exports();
test_data_exports();
free_expect_struct();
TlsFree(expect_idx);
FreeLibrary(msvcp);

View File

@ -1114,7 +1114,7 @@
@ stub -arch=win64 ?_Assign@_Concurrent_queue_iterator_base_v4@details@Concurrency@@IEAAXAEBV123@@Z
@ stub ?_Atexit@@YAXP6AXXZ@Z
@ extern ?_BADOFF@std@@3_JB msvcp120.?_BADOFF@std@@3_JB
# extern ?_Byte_reverse_table@details@Concurrency@@3QBEB
@ extern ?_Byte_reverse_table@details@Concurrency@@3QBEB msvcp120.?_Byte_reverse_table@details@Concurrency@@3QBEB
@ cdecl -arch=arm ?_C_str@?$_Yarn@D@std@@QBAPBDXZ(ptr) msvcp120.?_C_str@?$_Yarn@D@std@@QBAPBDXZ
@ thiscall -arch=i386 ?_C_str@?$_Yarn@D@std@@QBEPBDXZ(ptr) msvcp120.?_C_str@?$_Yarn@D@std@@QBEPBDXZ
@ cdecl -arch=win64 ?_C_str@?$_Yarn@D@std@@QEBAPEBDXZ(ptr) msvcp120.?_C_str@?$_Yarn@D@std@@QEBAPEBDXZ