http://bugs.winehq.org/show_bug.cgi?id=28273
--- Comment #6 from Anastasius Focht focht@gmx.net 2012-04-22 06:18:06 CDT --- Hello,
--- snip --- 0028:Ret KERNEL32.LoadLibraryExA() retval=1a400000 ret=7fbeb9ad6d8c 0028:Call KERNEL32.GetProcAddress(1a400000,7fbeb9ad7064 "DllInstall") ret=7fbeb9ad6d9f 0028:Ret KERNEL32.GetProcAddress() retval=1a451c50 ret=7fbeb9ad6d9f 0028:Call KERNEL32.CompareStringW(0000007f,00001001,00000001,ffffffff,1a4f6aa0 L"HKCU",ffffffff) ret=1a4082e7 0028:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7fbeba2b51e3 ip=7fbeba2b51e3 tid=0028 0028:trace:seh:raise_exception info[0]=0000000000000000 0028:trace:seh:raise_exception info[1]=0000000000000001 0028:trace:seh:raise_exception rax=00007fbeba2b4fd0 rbx=0000000000000001 rcx=000000000000007f rdx=0000000000001001 0028:trace:seh:raise_exception rsi=000000000022f580 rdi=000000000022f3c0 rbp=0000000000001001 rsp=000000000022f2b0 0028:trace:seh:raise_exception r8=00000000ffffffff r9=0000000000000000 r10=00000000000011f3 r11=0000000000000246 0028:trace:seh:raise_exception r12=000000001a4f6aa0 r13=0000000000014af0 r14=0000000000000000 r15=000000000022f578 --- snip ---
The str1 argument to CompareStringW() looks suspicious (0x1, like a bool). It should be the stack address of "command_line" passed to DllInstall().
Unfortunately you have to go through a debugging session ... First start regsvr32 in 64-bit mode with a debugger:
--- snip --- $ WINEDLLOVERRIDES=urlmon=n wine64 winedbg regsvr32 /i urlmon.dll WineDbg starting on pid 0023 0x00007fcb866b5f59 DbgBreakPoint+0x1 in ntdll: ret --- snip ---
Set a breakpoint to "InstallDll" and "continue":
--- snip --- Wine-dbg>b InstallDll Breakpoint 1 at 0x00007fcb7fde9aa5 InstallDll [/home/focht/projects/wine/wine-git/programs/regsvr32/regsvr32.c:161] in regsvr32
Wine-dbg>c --- snip ---
It will stop at breakpoint:
--- snip --- Stopped on breakpoint 1 at 0x00007fcb7fde9aa5 InstallDll [/home/focht/projects/wine/wine-git/programs/regsvr32/regsvr32.c:161] in regsvr32 InstallDll () at /home/focht/projects/wine/wine-git/programs/regsvr32/regsvr32.c:161 161 { --- snip ---
Source step over using "n" (next) 4 times until you see line 170: hr = pfInstall(install, command_line);
--- snip --- Wine-dbg>n 164 HMODULE DllHandle = NULL; Wine-dbg>n 166 pfInstall = LoadProc(strDll, "DllInstall", &DllHandle); Wine-dbg>n ... fixme:thread:ReleaseSRWLockShared (0x5dec0298): stub 167 if (!pfInstall) Wine-dbg>n 170 hr = pfInstall(install, command_line); --- snip ---
Say "info locals":
--- snip --- Wine-dbg>info locals 0x00007f0e3f9aaaec InstallDll+0x47: (0023fb10) BOOL install=0x1 (parameterRBP) char* strDll="urlmon.dll" (parameterRBP) WCHAR* command_line="" (parameterRBP) HRESULT hr=0 (localRBP) DLLINSTALL pfInstall=0x1a451c50 (localRBP) HMODULE DllHandle=0x1a400000 (localRBP) --- snip ---
Say "bt" (backtrace):
--- snip --- Wine-dbg>bt Backtrace: =>0 0x00007f0e3f9aaaec InstallDll+0x47(install=0x1, strDll="urlmon.dll", command_line="") [/home/focht/projects/wine/wine-git/programs/regsvr32/regsvr32.c:170] in regsvr32 (0x000000000023fb10) 1 0x00007f0e3f9aaff4 main+0x453(argc=0x3, argv=0x10640) [/home/focht/projects/wine/wine-git/programs/regsvr32/regsvr32.c:278] in regsvr32 (0x000000000023fbd0) 2 0x00007f0e3f9ab0e9 __wine_spec_exe_entry+0xa0(peb=0x7fffffbef000) [/home/focht/projects/wine/wine-git/dlls/winecrt0/exe_entry.c:36] in regsvr32 (0x000000000023fcc0) 3 0x000000007b878685 call_process_entry+0x1c(peb=0x7fffffbef000, entry=0x7f0e3f9ab048) [/home/focht/projects/wine/wine-git/dlls/kernel32/process.c:1052] in kernel32 (0x000000000023fd00) 4 0x000000007b878837 start_process+0x1af(peb=0x7fffffbef000) [/home/focht/projects/wine/wine-git/dlls/kernel32/process.c:1083] in kernel32 (0x000000000023fe20) ... --- snip ---
Now instruction single step 5 times using "si" until you see "calll *%ecx"
--- snip --- Wine-dbg>si 0x00007f7397ebaaf0 InstallDll+0x4b [/home/focht/projects/wine/wine-git/programs/regsvr32/regsvr32.c:170] in regsvr32: movl 0xffffffffffffffdc(%rbp),%eax 170 hr = pfInstall(install, command_line); Wine-dbg>si 0x00007f7397ebaaf3 InstallDll+0x4e [/home/focht/projects/wine/wine-git/programs/regsvr32/regsvr32.c:170] in regsvr32: movq 0xfffffffffffffff8(%rbp),%rcx 170 hr = pfInstall(install, command_line); Wine-dbg>si 0x00007f7397ebaaf7 InstallDll+0x52 [/home/focht/projects/wine/wine-git/programs/regsvr32/regsvr32.c:170] in regsvr32: movq %rdx,%rsi 170 hr = pfInstall(install, command_line); Wine-dbg>si 0x00007f7397ebaafa InstallDll+0x55 [/home/focht/projects/wine/wine-git/programs/regsvr32/regsvr32.c:170] in regsvr32: movl %eax,%edi 170 hr = pfInstall(install, command_line); Wine-dbg>si 0x00007f7397ebaafc InstallDll+0x57 [/home/focht/projects/wine/wine-git/programs/regsvr32/regsvr32.c:170] in regsvr32: calll *%ecx 170 hr = pfInstall(install, command_line); --- snip ---
Dump the register context at this point using "info reg":
--- snip --- Wine-dbg>info reg Register dump: rip:00007f7397ebaafc rsp:000000000023fab0 rbp:000000000023fb10 eflags:00000306 ( - -- IT - -P- ) rax:0000000000000001 rbx:00007fffffbe8000 rcx:000000001a451c50 rdx:000000000023fb70 rsi:000000000023fb70 rdi:0000000000000001 r8:0000000000010710 r9:0000000000000007 r10:000000399ab2eaa0 r11:000000000023f220 r12:000000007bf00bc0 r13:00007fff70b63ae0 r14:0000000000000000 r15:0000000000000000 --- snip ---
Attach the output of the debugging session.
Regards