Commit ad24187d authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

ntdll: Stub ThreadEnableAlignmentFaultFixup info class.

parent 6e9920a1
...@@ -2505,6 +2505,37 @@ static void test_NtGetCurrentProcessorNumber(void) ...@@ -2505,6 +2505,37 @@ static void test_NtGetCurrentProcessorNumber(void)
ok(status == STATUS_SUCCESS, "got 0x%x (expected STATUS_SUCCESS)\n", status); ok(status == STATUS_SUCCESS, "got 0x%x (expected STATUS_SUCCESS)\n", status);
} }
static void test_ThreadEnableAlignmentFaultFixup(void)
{
NTSTATUS status;
ULONG dummy;
dummy = 0;
status = NtQueryInformationThread( GetCurrentThread(), ThreadEnableAlignmentFaultFixup, &dummy, sizeof(ULONG), NULL );
ok( status == STATUS_INVALID_INFO_CLASS || broken(STATUS_NOT_IMPLEMENTED), "Expected STATUS_INVALID_INFO_CLASS, got %08x\n", status );
status = NtQueryInformationThread( GetCurrentThread(), ThreadEnableAlignmentFaultFixup, &dummy, 1, NULL );
ok( status == STATUS_INVALID_INFO_CLASS || broken(STATUS_NOT_IMPLEMENTED), "Expected STATUS_INVALID_INFO_CLASS, got %08x\n", status );
dummy = 1;
status = pNtSetInformationThread( GetCurrentThread(), ThreadEnableAlignmentFaultFixup, &dummy, sizeof(ULONG) );
ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status );
status = pNtSetInformationThread( (HANDLE)0xdeadbeef, ThreadEnableAlignmentFaultFixup, NULL, 0 );
ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status );
status = pNtSetInformationThread( (HANDLE)0xdeadbeef, ThreadEnableAlignmentFaultFixup, NULL, 1 );
ok( status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %08x\n", status );
status = pNtSetInformationThread( (HANDLE)0xdeadbeef, ThreadEnableAlignmentFaultFixup, &dummy, 1 );
todo_wine ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status );
status = pNtSetInformationThread( GetCurrentProcess(), ThreadEnableAlignmentFaultFixup, &dummy, 1 );
todo_wine ok( status == STATUS_OBJECT_TYPE_MISMATCH, "Expected STATUS_OBJECT_TYPE_MISMATCH, got %08x\n", status );
dummy = 1;
status = pNtSetInformationThread( GetCurrentThread(), ThreadEnableAlignmentFaultFixup, &dummy, 1 );
ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status );
dummy = 0;
status = pNtSetInformationThread( GetCurrentProcess(), ThreadEnableAlignmentFaultFixup, &dummy, 8 );
ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status );
}
static DWORD WINAPI start_address_thread(void *arg) static DWORD WINAPI start_address_thread(void *arg)
{ {
PRTL_THREAD_START_ROUTINE entry; PRTL_THREAD_START_ROUTINE entry;
...@@ -2774,4 +2805,6 @@ START_TEST(info) ...@@ -2774,4 +2805,6 @@ START_TEST(info)
test_readvirtualmemory(); test_readvirtualmemory();
test_queryvirtualmemory(); test_queryvirtualmemory();
test_NtGetCurrentProcessorNumber(); test_NtGetCurrentProcessorNumber();
test_ThreadEnableAlignmentFaultFixup();
} }
...@@ -1137,10 +1137,12 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, ...@@ -1137,10 +1137,12 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
if (ret_len) *ret_len = sizeof(BOOLEAN); if (ret_len) *ret_len = sizeof(BOOLEAN);
return STATUS_SUCCESS; return STATUS_SUCCESS;
case ThreadEnableAlignmentFaultFixup:
return STATUS_INVALID_INFO_CLASS;
case ThreadPriority: case ThreadPriority:
case ThreadBasePriority: case ThreadBasePriority:
case ThreadImpersonationToken: case ThreadImpersonationToken:
case ThreadEnableAlignmentFaultFixup:
case ThreadEventPair_Reusable: case ThreadEventPair_Reusable:
case ThreadZeroTlsCell: case ThreadZeroTlsCell:
case ThreadPerformanceCount: case ThreadPerformanceCount:
...@@ -1316,11 +1318,16 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, ...@@ -1316,11 +1318,16 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
#endif #endif
} }
case ThreadEnableAlignmentFaultFixup:
if (length != sizeof(BOOLEAN)) return STATUS_INFO_LENGTH_MISMATCH;
if (!data) return STATUS_ACCESS_VIOLATION;
FIXME( "ThreadEnableAlignmentFaultFixup stub!\n" );
return STATUS_SUCCESS;
case ThreadBasicInformation: case ThreadBasicInformation:
case ThreadTimes: case ThreadTimes:
case ThreadPriority: case ThreadPriority:
case ThreadDescriptorTableEntry: case ThreadDescriptorTableEntry:
case ThreadEnableAlignmentFaultFixup:
case ThreadEventPair_Reusable: case ThreadEventPair_Reusable:
case ThreadPerformanceCount: case ThreadPerformanceCount:
case ThreadAmILastThread: case ThreadAmILastThread:
......
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