[Bug 39475] PhysX 9.15.0428 installer does not run ('advapi32.RegOpenCurrentUser' must return a real handle instead of 'HKEY_CURRENT_USER' for user root key)
wine-bugs at winehq.org
wine-bugs at winehq.org
Mon Oct 19 16:24:06 CDT 2015
https://bugs.winehq.org/show_bug.cgi?id=39475
Anastasius Focht <focht at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |focht at gmx.net
Component|-unknown |advapi32
Summary|PhysX-9.15.0428-SystemSoftw |PhysX 9.15.0428 installer
|are.exe installer does not |does not run
|run |('advapi32.RegOpenCurrentUs
| |er' must return a real
| |handle instead of
| |'HKEY_CURRENT_USER' for
| |user root key)
--- Comment #4 from Anastasius Focht <focht at gmx.net> ---
Hello folks,
confirming.
Relevant part of trace log, although not much to see:
--- snip ---
...
0009:trace:loaddll:load_native_dll Loaded L"C:\\Program Files\\NVIDIA
Corporation\\Installer2\\CoreTemp.{A2E4DA23-2EF5-4B91-9BC8-C716C4DF0A47}\\NVI2.DLL"
at 0x10000000: native
...
0026:Call advapi32.RegOpenCurrentUser(000f003f,0228e144) ret=101e73df
0026:Ret advapi32.RegOpenCurrentUser() retval=00000000 ret=101e73df
0026:Call ntdll.RtlAllocateHeap(00580000,00000000,0000000c) ret=10231c71
0026:Ret ntdll.RtlAllocateHeap() retval=02640660 ret=10231c71
...
0026:Call advapi32.RegOpenCurrentUser(000f003f,0228df24) ret=101e73df
0026:Ret advapi32.RegOpenCurrentUser() retval=00000000 ret=101e73df
0026:Call ntdll.RtlAllocateHeap(00580000,00000000,0000000c) ret=10231c71
0026:Ret ntdll.RtlAllocateHeap() retval=02645d00 ret=10231c71
...
0026:Call advapi32.RegOpenCurrentUser(000f003f,0228dd04) ret=101e73df
0026:Ret advapi32.RegOpenCurrentUser() retval=00000000 ret=101e73df
...
0026:Call advapi32.RegOpenCurrentUser(000f003f,02192884) ret=101e73df
0026:Ret advapi32.RegOpenCurrentUser() retval=00000000 ret=101e73df
0026:trace:seh:raise_exception code=c00000fd flags=0 addr=0xf741a628
ip=f741a628 tid=0026
0026:trace:seh:raise_exception eax=0228ef4c ebx=00000002 ecx=f751b4fc
edx=ffffffff esi=0228f34b edi=021925f0
0026:trace:seh:raise_exception ebp=00000002 esp=02191ff0 cs=0023 ds=002b
es=002b fs=0063 gs=006b flags=00010283
0026:trace:seh:call_stack_handlers calling handler at 0x1027855b code=c00000fd
flags=0
<stack overflow due to recursion>
--- snip ---
One has to debug it out ;-)
Currently 'RegOpenCurrentUser' always returns the builtin special root key
'HKEY_CURRENT_USER' (0x80000001) which the NVIDIA installer doesn't expect.
It needs to be a *real* registry key handle.
App code:
--- snip ---
101E7389 8D86 00000080 LEA EAX,DWORD PTR DS:[ESI+80000000] ; rootkey range
101E738F 83F8 05 CMP EAX,5
101E7392 0F87 AA000000 JA NVI2.101E7442 ; > normal handle value
101E7398 FF2485 E0751E10 JMP DWORD PTR DS:[EAX*4+101E75E0] ; HKEY_XX handler
...
101E73D0 8D45 DC LEA EAX,DWORD PTR SS:[EBP-24]
101E73D3 50 PUSH EAX
101E73D4 68 3F000F00 PUSH 0F003F
101E73D9 FF15 50B02A10 CALL DWORD PTR DS:[<&ADVAPI32.RegOpenCurrentUser>
101E73DF 8B4D DC MOV ECX,DWORD PTR SS:[EBP-24]
101E73E2 51 PUSH ECX
101E73E3 8D4D CC LEA ECX,DWORD PTR SS:[EBP-34]
101E73E6 E8 75E7E6FF CALL NVI2.10055B60
...
--- snip ---
Source:
https://source.winehq.org/git/wine.git/blob/a754579159e9c59a39bd9e7809e0c54598f7556d:/dlls/advapi32/registry.c#l635
--- snip ---
635 LSTATUS WINAPI RegOpenCurrentUser( REGSAM access, PHKEY retkey )
636 {
637 return RegOpenKeyExA( HKEY_CURRENT_USER, "", 0, access, retkey );
638 }
--- snip ---
https://source.winehq.org/git/wine.git/blob/a754579159e9c59a39bd9e7809e0c54598f7556d:/dlls/advapi32/registry.c#l476
--- snip ---
476 LSTATUS WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR name, DWORD options,
REGSAM access, PHKEY retkey )
477 {
478 OBJECT_ATTRIBUTES attr;
479 UNICODE_STRING nameW;
480
481 if (retkey && (!name || !name[0]) &&
482 (HandleToUlong(hkey) >= HandleToUlong(HKEY_SPECIAL_ROOT_FIRST)) &&
483 (HandleToUlong(hkey) <= HandleToUlong(HKEY_SPECIAL_ROOT_LAST)))
484 {
485 *retkey = hkey;
486 return ERROR_SUCCESS;
487 }
...
504 }
--- snip ---
$ sha1sum PhysX-9.15.0428-SystemSoftware.exe
6082e7ea65523f258c26850d0b0891522bffe2ea PhysX-9.15.0428-SystemSoftware.exe
$ du -sh PhysX-9.15.0428-SystemSoftware.exe
23M PhysX-9.15.0428-SystemSoftware.exe
$ wine --version
wine-1.7.53
Regards
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list