https://git.reactos.org/?p=reactos.git;a=commitdiff;h=df7ab5d8f7a59fd407f2f2...
commit df7ab5d8f7a59fd407f2f2de89f155ab90c98711 Author: Ratin Gao ratin@knsoft.org AuthorDate: Fri Mar 10 00:08:08 2023 +0800 Commit: GitHub noreply@github.com CommitDate: Thu Mar 9 17:08:08 2023 +0100
[KERNEL32] Remove a pointless SEH in VirtualAllocEx (#5117)
Win2K3 just wraps in SEH only this syscall, which appears pointless and was removed since NT6.0. We remove it too as an experiment. Revert the change that added SEH here from commit 6d97180 (r52899). --- dll/win32/kernel32/client/virtmem.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/dll/win32/kernel32/client/virtmem.c b/dll/win32/kernel32/client/virtmem.c index 7b4085c0ba4..e2ae076266f 100644 --- a/dll/win32/kernel32/client/virtmem.c +++ b/dll/win32/kernel32/client/virtmem.c @@ -37,22 +37,13 @@ VirtualAllocEx(IN HANDLE hProcess, return NULL; }
- /* Handle any possible exceptions */ - _SEH2_TRY - { - /* Allocate the memory */ - Status = NtAllocateVirtualMemory(hProcess, - &lpAddress, - 0, - &dwSize, - flAllocationType, - flProtect); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Status = _SEH2_GetExceptionCode(); - } - _SEH2_END; + /* Allocate the memory */ + Status = NtAllocateVirtualMemory(hProcess, + &lpAddress, + 0, + &dwSize, + flAllocationType, + flProtect);
/* Check for status */ if (!NT_SUCCESS(Status))