PLT pointer destroyed problem when loading IR32_32.DLL (Indeo codec)
Marcus Meissner
marcus at jet.franken.de
Wed Mar 17 17:32:48 CST 2004
On Wed, Mar 17, 2004 at 10:37:01PM +0000, Christian Costa wrote:
> 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.
This might happen.
Your fix is not really ok, you must not modify the stackpointer in asm statements.
Try using:
__asm__ __volatile__ ("":::"ebx");
after entry(), which tells the compiler that ebx has been scrapped.
Ciao, Marcus
More information about the wine-devel
mailing list