Drop use_dont_resolve_hack flag
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
807a628ec6
commit
105f79b489
|
@ -332,31 +332,17 @@ union retchain
|
|||
/* This function handles the problem described here:
|
||||
|
||||
http://www.microsoft.com/technet/security/advisory/2269637.mspx
|
||||
https://msdn.microsoft.com/library/ff919712
|
||||
|
||||
It also contains a workaround for the problem reported here:
|
||||
http://cygwin.com/ml/cygwin/2011-02/msg00552.html
|
||||
and discussed here:
|
||||
http://cygwin.com/ml/cygwin-developers/2011-02/threads.html#00007
|
||||
|
||||
To wit: winmm.dll calls FreeLibrary in its DllMain and that can result
|
||||
in LoadLibraryExW returning an ERROR_INVALID_ADDRESS. */
|
||||
https://msdn.microsoft.com/library/ff919712 */
|
||||
static __inline bool
|
||||
dll_load (HANDLE& handle, PWCHAR name)
|
||||
{
|
||||
HANDLE h = NULL;
|
||||
WCHAR dll_path[MAX_PATH];
|
||||
|
||||
/* If that failed, try loading with full path, which sometimes
|
||||
fails for no good reason. */
|
||||
/* Try loading with full path, which sometimes fails for no good reason. */
|
||||
wcpcpy (wcpcpy (dll_path, windows_system_directory), name);
|
||||
h = LoadLibraryW (dll_path);
|
||||
/* If that failed according to the second problem outlined in the
|
||||
comment preceeding this function. */
|
||||
if (!h && handle && wincap.use_dont_resolve_hack ()
|
||||
&& GetLastError () == ERROR_INVALID_ADDRESS)
|
||||
h = LoadLibraryExW (dll_path, NULL, DONT_RESOLVE_DLL_REFERENCES);
|
||||
/* Last resort: Try loading just by name. */
|
||||
/* If it failed, try loading just by name. */
|
||||
if (!h)
|
||||
h = LoadLibraryW (name);
|
||||
if (!h)
|
||||
|
|
|
@ -24,7 +24,6 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||
needs_count_in_si_lpres2:false,
|
||||
has_gaa_largeaddress_bug:false,
|
||||
has_broken_alloc_console:false,
|
||||
use_dont_resolve_hack:true,
|
||||
has_console_logon_sid:false,
|
||||
wow64_has_secondary_stack:false,
|
||||
has_program_compatibility_assistant:false,
|
||||
|
@ -47,7 +46,6 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||
needs_count_in_si_lpres2:false,
|
||||
has_gaa_largeaddress_bug:false,
|
||||
has_broken_alloc_console:false,
|
||||
use_dont_resolve_hack:true,
|
||||
has_console_logon_sid:false,
|
||||
wow64_has_secondary_stack:true,
|
||||
has_program_compatibility_assistant:false,
|
||||
|
@ -70,7 +68,6 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||
needs_count_in_si_lpres2:true,
|
||||
has_gaa_largeaddress_bug:true,
|
||||
has_broken_alloc_console:false,
|
||||
use_dont_resolve_hack:false,
|
||||
has_console_logon_sid:false,
|
||||
wow64_has_secondary_stack:false,
|
||||
has_program_compatibility_assistant:true,
|
||||
|
@ -93,7 +90,6 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||
needs_count_in_si_lpres2:false,
|
||||
has_gaa_largeaddress_bug:true,
|
||||
has_broken_alloc_console:true,
|
||||
use_dont_resolve_hack:false,
|
||||
has_console_logon_sid:true,
|
||||
wow64_has_secondary_stack:false,
|
||||
has_program_compatibility_assistant:true,
|
||||
|
@ -116,7 +112,6 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||
needs_count_in_si_lpres2:false,
|
||||
has_gaa_largeaddress_bug:false,
|
||||
has_broken_alloc_console:true,
|
||||
use_dont_resolve_hack:false,
|
||||
has_console_logon_sid:true,
|
||||
wow64_has_secondary_stack:false,
|
||||
has_program_compatibility_assistant:true,
|
||||
|
@ -139,7 +134,6 @@ wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||
needs_count_in_si_lpres2:false,
|
||||
has_gaa_largeaddress_bug:false,
|
||||
has_broken_alloc_console:true,
|
||||
use_dont_resolve_hack:false,
|
||||
has_console_logon_sid:true,
|
||||
wow64_has_secondary_stack:false,
|
||||
has_program_compatibility_assistant:true,
|
||||
|
@ -162,7 +156,6 @@ wincaps wincap_10_1511 __attribute__((section (".cygwin_dll_common"), shared)) =
|
|||
needs_count_in_si_lpres2:false,
|
||||
has_gaa_largeaddress_bug:false,
|
||||
has_broken_alloc_console:true,
|
||||
use_dont_resolve_hack:false,
|
||||
has_console_logon_sid:true,
|
||||
wow64_has_secondary_stack:false,
|
||||
has_program_compatibility_assistant:true,
|
||||
|
|
|
@ -17,7 +17,6 @@ struct wincaps
|
|||
unsigned needs_count_in_si_lpres2 : 1;
|
||||
unsigned has_gaa_largeaddress_bug : 1;
|
||||
unsigned has_broken_alloc_console : 1;
|
||||
unsigned use_dont_resolve_hack : 1;
|
||||
unsigned has_console_logon_sid : 1;
|
||||
unsigned wow64_has_secondary_stack : 1;
|
||||
unsigned has_program_compatibility_assistant : 1;
|
||||
|
@ -65,7 +64,6 @@ public:
|
|||
bool IMPLEMENT (needs_count_in_si_lpres2)
|
||||
bool IMPLEMENT (has_gaa_largeaddress_bug)
|
||||
bool IMPLEMENT (has_broken_alloc_console)
|
||||
bool IMPLEMENT (use_dont_resolve_hack)
|
||||
bool IMPLEMENT (has_console_logon_sid)
|
||||
bool IMPLEMENT (wow64_has_secondary_stack)
|
||||
bool IMPLEMENT (has_program_compatibility_assistant)
|
||||
|
|
Loading…
Reference in New Issue