On Windows the function that calls the language specific exception handler function registers it's own exception handler, so the top of the exception chain does not point to our own handler. We need to take that into account when unwinding the stack and removing each handler as we go.
Previously, when leave was used in the except or finally block of a nested try block, it would jump back to the start of the except/finally block, resulting in an endless loop. This is fixed by jumping back to a label at the beginning of the try block, which is only visible from within the try block itself and from there to the end of the SEH block.
Fixes seh0055 testcase of MS SEH tests.
* [SDK] Partial Revert of 0bf42067d2
It was found that the timer code from WINE doesn't work as well as ours,
This is a revert from that part of the PR as it doesn't change any of the real threadpool code in all reality. Thanks to the investigation of Julenuri and Simone
JIRA issue: CORE-20245
Hackfixing a corner case detected via broken entities of wlanwiz
due to its usage of STLport. This was already done to PSEH3 prior to me.
Corner case examples:
- broken: 1591123914
- "fixed": 1594570563
Guard SEH2 family macros behind #ifndef. CORE-6622 CORE-6905
- [PSDK] Sync wincrypt.h to Wine 10.0, keeping our SAL annotated function definitions behind an #ifdef guard
- [XDK] Add definitions to our winnt header that Wine 10.0's winternl.h depends on.
- [INCLUDE/WINE] Sync winternl.h to Wine 10.0
- [OTHER] Fix breaking changes with the synced winternl.h.
"Far East Asian" Visual Studio had
generated a lot of "warning C4819:
File contains characters that
cannot be displayed in the current
code page...".
JIRA issue: N/A
Note: On Windows, where a long double is the same as a double, nextafterl is the same as nextafter, nexttowardl is the same as nexttoward.
Also nexttoward is the same as nextafter.
Implement SystemLoadGdiDriverInSystemSpaceInformation case of NtSetSystemInformation() function.
According to https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/gdi_driver.htm, it does the similar thing to SystemLoadGdiDriverInformation (these two cases even have the same shared SYSTEM_GDI_DRIVER_INFORMATION structure).
The only difference is, SystemLoadGdiDriverInSystemSpaceInformation uses the global system space (without passing an additional flag to MmLoadSystemImage()), while SystemLoadGdiDriverInformation uses the session space instead.
Since the session space is not supported yet, for now simply redirect SystemLoadGdiDriverInSystemSpaceInformation to SystemLoadGdiDriverInformation case, which we have already implemented. However, this code needs to be updated appropriately (an additional flag should be passed to MmLoadSystemImage() call for SystemGdiDriverInformation as well) once a support for session space is implemented.
This fixes VM starting failure for VirtualBox 3.1.0 - 4.0.24 and 4.3.0 - 4.3.12 versions. Newer versions of VirtualBox still don't work because of another blocking bugs.
CORE-20257
CORE-12686
This collection of libraries consist in:
- a down-level `pathcch_static` PathCch library, to be used for programs
that need to run on Windows 7 and below;
- Windows 8+ compatible libraries importing from either kernelbase.dll
(`pathcch_kernelbase`), or from the corresponding APISET
api-ms-win-core-path-l1-1-0.dll (`pathcch`, which is Win8+ PSDK
compatible).
The down-level static library is compiled by reusing the newly-introduced
kernelbase's path.c, instead of using a specific pathcch.c.
Unrelated functions are excluded from compilation by putting them into
`#ifndef STATIC_PATHCCH ..... #endif` blocks.
Since VS 17.14.36203.30 / MSVC 19.44.35209.0 the default behavior on ARM64 is to not inline _Interlocked* functions. Until we have those implemented, we disable this feature, going back to the old behavior.
For additional details / tracking of the implementation see CORE-20255