[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Crash in DLL entrypoint
From: Andreas Mohr <a.mohr () mailto ! de>
Date: 1999-12-31 10:50:35
[Download RAW message or body]
Hi all,
I have a program called apimon.exe which crashes:
Call KERNEL32.565: QueryPerformanceFrequency(01026ed8) ret=0100a479 fs=0237
Ret KERNEL32.565: QueryPerformanceFrequency() retval=00000001 ret=0100a479 fs=0237
Call KERNEL32.495: LoadLibraryA(0100175c "psapi.dll") ret=0100a484 fs=0237
trace:relay:PE_InitDLL \
CallTo32(entryproc=0x4fb82c6e,module=4fb80000,type=1,res=(nil)) Call KERNEL32.189: \
DisableThreadLibraryCalls(4fb80000) ret=4fb82ca2 fs=0237 Ret KERNEL32.189: \
DisableThreadLibraryCalls() retval=00000001 ret=4fb82ca2 fs=0237 Call KERNEL32.340: \
GetLastError() ret=78009cb8 fs=0237 Ret KERNEL32.340: GetLastError() retval=00000057 \
ret=78009cb8 fs=0237 Call KERNEL32.693: TlsGetValue(00000000) ret=78009cc6 fs=0237
Ret KERNEL32.693: TlsGetValue() retval=40c80100 ret=78009cc6 fs=0237
Call KERNEL32.654: SetLastError(00000057) ret=78009d25 fs=0237
Ret KERNEL32.654: SetLastError() retval=40900000 ret=78009d25 fs=0237
Call KERNEL32.702: UnhandledExceptionFilter(40a0f5d4) ret=7800d337 fs=0237
Unhandled exception: page fault on read access to 0x0000010b in 32-bit code \
(0x4fb82cae). In 32 bit mode.
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0237 GS:0000
EIP:4fb82cae ESP:40a0f8f0 EBP:40a0f8f0 EFLAGS:00010297( R- 00 I S -A-P1C)
EAX:4046faec EBX:40a344bc ECX:00000103 EDX:00000054
ESI:4fb82c6e EDI:00000000
Stack dump:
0x40a0f8f0 (USER32.dll.SetProcessDefaultLayout+0x12c7c4): 40a0f920 081e7244 4fb80000 \
00000001 0x40a0f900 (USER32.dll.SetProcessDefaultLayout+0x12c7d4): 00000000 08362981 \
40a344bc 00000001 0x40a0f910 (USER32.dll.SetProcessDefaultLayout+0x12c7e4): 00000000 \
0825a3c2 00000000 40a0fa7c 0x40a0f920 (USER32.dll.SetProcessDefaultLayout+0x12c7f4): \
40a0f950 081e2483 40a344bc 00000001 0x40a0f930 \
(USER32.dll.SetProcessDefaultLayout+0x12c804): 00000000 081e4886 00000003 40a344bc \
0x40a0f940 (USER32.dll.SetProcessDefaultLayout+0x12c814): 00000001 40a0f974 40900000 \
40a0fa7c
0046: sel=0237 base=40900000 limit=00000fff 32-bit rw-
Backtrace:
=>0 0x4fb82cae (psapi.dll.EntryPoint+0x40) (ebp=40a0f8f0)
1 0x081e7244 (PE_InitDLL+0xa0(wm=0x40a344bc, type=0x1, lpReserved=0x0) \
[pe_image.c:1042]) (ebp=40a0f920) 2 0x081e2483 (MODULE_InitDll+0x9f(wm=0x40a344bc, \
type=0x1, lpReserved=0x0) [module.c:115]) (ebp=40a0f950) 3 0x081e25ff \
(MODULE_DllProcessAttach+0xcf(wm=0x40a344bc, lpReserved=0x0) [module.c:190]) \
(ebp=40a0f980) 4 0x081e4547 (LoadLibraryExA+0x6f(libname=0x100175c, hfile=0x0, \
flags=0x0) [module.c:1335]) (ebp=40a0f9b0) 5 0x081e491d \
(LoadLibraryA+0x15(libname=0x100175c) [module.c:1456]) (ebp=40a0f9d0) 6 0x08254dea \
(RELAY_CallFrom32+0x2f6(ret_addr=0x100a484) [relay386.c:168]) (ebp=40a0fa70) 7 \
0x407938c9 (KERNEL32.dll.LoadLibraryA+0x5) (ebp=40a0fe2c) 8 0x01014f57 \
(apimon.exe.EntryPoint+0x157) (ebp=40a0fed8) 9 0x0825bf3d (PROCESS_Start+0x40d \
[process.c:379]) (ebp=40a0ff34) 10 0x0825da78 \
(SYSDEPS_StartThread+0x30(teb=0x40900000) [sysdeps.c:132]) (ebp=40a0fff4) 11 \
0x402dca1a (_end+0x37e57552) (ebp=00000000)
*** Invalid address 0x00000000 (_fp_hw)
0x4fb82cae (psapi.dll.EntryPoint+0x40): testb $0x2,0x8(%ecx)
Wine-dbg>disas 0x4fb82c6e,0x4fb82cc0
0x4fb82c6e (psapi.dll.EntryPoint): pushl %ebp
0x4fb82c6f (psapi.dll.EntryPoint+0x1): movl 0xc(%esp),%eax
0x4fb82c73 (psapi.dll.EntryPoint+0x5): movl %esp,%ebp
0x4fb82c75 (psapi.dll.EntryPoint+0x7): testl %eax,%eax
0x4fb82c77 (psapi.dll.EntryPoint+0x9): jz 0x4fb82c80 \
(psapi.dll.EntryPoint+0x12) 0x4fb82c79 (psapi.dll.EntryPoint+0xb): cmpl $1,%eax
0x4fb82c7c (psapi.dll.EntryPoint+0xe): jz 0x4fb82c99 \
(psapi.dll.EntryPoint+0x2b) 0x4fb82c7e (psapi.dll.EntryPoint+0x10): jmp \
0x4fb82cbe (psapi.dll.EntryPoint+0x50) 0x4fb82c80 (psapi.dll.EntryPoint+0x12): movl \
%fs:0x18,%eax 0x4fb82c86 (psapi.dll.EntryPoint+0x18): movl 0x30(%eax),%eax
0x4fb82c89 (psapi.dll.EntryPoint+0x1b): movl 0x10(%eax),%ecx
0x4fb82c8c (psapi.dll.EntryPoint+0x1e): testb $0x2,0x8(%ecx)
0x4fb82c90 (psapi.dll.EntryPoint+0x22): jz 0x4fb82cbe \
(psapi.dll.EntryPoint+0x50) 0x4fb82c92 (psapi.dll.EntryPoint+0x24): call \
0x4fb82427 (psapi.dll.QueryWorkingSet+0x688) 0x4fb82c97 (psapi.dll.EntryPoint+0x29): \
jmp 0x4fb82cbe (psapi.dll.EntryPoint+0x50) 0x4fb82c99 \
(psapi.dll.EntryPoint+0x2b): pushl 0x8(%ebp) 0x4fb82c9c \
(psapi.dll.EntryPoint+0x2e): call *0x4fb81044 -> 0x40792f34 \
(KERNEL32.dll.DisableThreadLibraryCalls) 0x4fb82ca2 (psapi.dll.EntryPoint+0x34): movl \
%fs:0x18,%eax 0x4fb82ca8 (psapi.dll.EntryPoint+0x3a): movl 0x30(%eax),%eax
0x4fb82cab (psapi.dll.EntryPoint+0x3d): movl 0x10(%eax),%ecx
0x4fb82cae (psapi.dll.EntryPoint+0x40): testb $0x2,0x8(%ecx)
0x4fb82cb2 (psapi.dll.EntryPoint+0x44): jz 0x4fb82cbe \
(psapi.dll.EntryPoint+0x50) 0x4fb82cb4 (psapi.dll.EntryPoint+0x46): call \
0x4fb82d91 (psapi.dll.EntryPoint+0x123) 0x4fb82cb9 (psapi.dll.EntryPoint+0x4b): call \
0x4fb81dfc (psapi.dll.QueryWorkingSet+0x5d) 0x4fb82cbe (psapi.dll.EntryPoint+0x50): \
movb $0x1,%al 0x4fb82cc0 (psapi.dll.EntryPoint+0x52): popl %ebp
Wine-dbg>
What is %fs:0x18 ?
Some thread related stuff, I guess...
Damn, I should finally get a clue about all those %fs, %gs and so on registers
;)
Oh, I just grepped through wine-devel:
0x77dd9a19 (RegOpenKeyExW+0xeb): movl %fs:0x18,%eax
ax = CurrentTeb;
Does that mean that this is just another TEB mess ?
This is a debugging program from NT4WS, BTW...
Oh yes, this *is* just another TEB mess.
0x4fb82ca2 (psapi.dll.EntryPoint+0x34): movl %fs:0x18,%eax
0x4fb82ca8 (psapi.dll.EntryPoint+0x3a): movl 0x30(%eax),%eax
0x4fb82cab (psapi.dll.EntryPoint+0x3d): movl 0x10(%eax),%ecx
0x4fb82cae (psapi.dll.EntryPoint+0x40): testb $0x2,0x8(%ecx)
Could somebody perhaps fix the TEB as far as it can be fixed for NT4 support
without breaking already existing version compatibility ?
Thank you all, a Happy New Year, and let's hope our cooperation will continue
to be as powerful and successful as it has always been ! :)
Andreas Mohr
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic