Clang requires the __getReg function to be declared in addition to
be declared as an intrinsic with the pragma.
This fixes the following error:
../wine/include/winnt.h:2412:27: error: call to undeclared library function '__getReg' with type 'unsigned long long (int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return (struct _TEB *)__getReg(18);
^
../wine/include/winnt.h:2412:27: note: include the header <intrin.h> or explicitly provide a declaration for '__getReg'
1 error generated.
Signed-off-by: Martin Storsjö <martin@martin.st>
This fixes some crashes especially when dealing with very long C++ names
(like template classes).
Fortunately, dwarf internals don't require type lookup by name (eg.
on forward declaration), so the impact of thrashing some names is limited.
It's very likely native doesn't store directly these very long names
(it could either store the qualified mangled name - which can be way shorter
for template classes - or use the names in lexical hierarchy: both boil down
to storing less information, and recompute it (unmangle or class hierarchy
walk) upon request).
But this would need a proper C++ support in dbghelp. Not for today.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This doesn't create anything, but instead notifies the user driver of
the current desktop window, either when it is created, or when a thread
calling NtUserGetDesktopWindow receives the current desktop window.
This allows any manifest resource IDs (e.g.,
ISOLATIONAWARE_MANIFEST_RESOURCE_ID) to be recognized when looking up
the assembly manifest of a dependency.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18889
Today, the test scenario "ACTCTX_FLAG_HMODULE_VALID but hModule if not
set" is broken and unreliable. This problem is not evident in WineHQ
batch test runs; rather, the test failure seems to only be triggered
when the kernel32:actctx test is run in isolation.
When the flag ACTCTX_FLAG_HMODULE_VALID is specified in ACTCTXW but
hModule is set to NULL, CreateActCtxW() may encounter different failure
modes depending on the test executable file. Error codes observed so
far include ERROR_SXS_CANT_GEN_ACTCTX and ERROR_SXS_MANIFEST_TOO_BIG.
When the aforementioned test reports ERROR_SXS_CANT_GEN_ACTCTX on
Windows, an event is recorded in the Windows Event Log as follows:
- Log Name: Application
- Source: SideBySide
- Event ID: 59
- Level: Error
- Description:
Activation context generation failed for "<path..>\kernel32_test.exe".Error in manifest or policy file "<path..>\kernel32_test.exe" on line 0.
Invalid Xml syntax.
It appears that the inconsistent failure was caused by Windows trying to
interpret the main executable file of the current process as an XML
manifest file. This fails due to one or more of the following reasons:
- ERROR_SXS_CANT_GEN_ACTCTX: A valid PE executable that starts with the
"MZ" signature is not a valid XML file.
- ERROR_SXS_MANIFEST_TOO_BIG (or ERROR_NOT_ENOUGH_MEMORY): The
executable's size may exceed the limit imposed by the manifest parser.
This is much more likely for binaries with debugging symbols.
Meanwhile, winetest.exe bundles a stripped version of the test
executable (kernel32_test-stripped.exe), which is often smaller than
the original executable (not stripped). This probably explains why
the problem was not visible in batch test runs.
Fix this by removing the failing test entirely.