Fix alignment of CONTEXT variable
The previous code had the `alignas()` in the wrong place, it needs to be left of the typename. Furthermore, `CONTEXT` has a default alignment of 16, so using `alignas(8)` underaligns. Signed-off-by: Chris Burel <burelc@amazon.com>
This commit is contained in:
@@ -1036,7 +1036,7 @@ cleanup:
|
||||
}
|
||||
|
||||
HANDLE hThread = nativeThread;
|
||||
CONTEXT alignas(8) context; // Without this alignment the function randomly crashes in release.
|
||||
alignas(alignof(CONTEXT)) CONTEXT context; // Without this alignment the function randomly crashes in release.
|
||||
context.ContextFlags = CONTEXT_ALL;
|
||||
GetThreadContext(hThread, &context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user