Hi,
When executing the DllMain of the native IR32_32.DLL (VFW), Wine crashes.
After some investigations, I found that a part of the code uses the EBX
register at one point without saving
and restore it afterwards. Since this register contains the PLT pointer
for standard unix functions like libc ones, this
does not take a long time for Wine to crashing.
I tested with the ugly hack attached that saves and restores the EBX
register between the call to DllMain and that fixed the problem and
the DLL works fine then.
Can someone tell me what happens?
Thanks in advance,
Christian
Index: loader.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/loader.c,v
retrieving revision 1.66
diff -u -r1.66 loader.c
--- loader.c 16 Mar 2004 03:10:07 -0000 1.66
+++ loader.c 17 Mar 2004 21:19:39 -0000
@@ -690,7 +690,9 @@
else TRACE("(%p %s,%s,%p) - CALL\n", module, debugstr_w(wm->ldr.BaseDllName.Buffer),
reason_names[reason], lpReserved );
+ __asm("push %ebx");
retv = entry( module, reason, lpReserved );
+ __asm("pop %ebx");
/* The state of the module list may have changed due to the call
to the dll. We cannot assume that this module has not been