[Wine] Potential bug in RtlRegisterWait()
Joakim Tjernlund
joakim.tjernlund at transmode.se
Mon May 3 02:15:29 CDT 2010
Charles Davis <cdavis at mymail.mines.edu> wrote on 2010/05/03 01:18:25:
>
> On 5/2/10 3:02 PM, Joakim Tjernlund wrote:
> >
> > Noticed that RtlRegisterWait() will approve a zero timeout value(Milliseconds == 0)
> >
> > This makes ies4linux spin the CPU 100% when visiting a
> > https page. The below crude patch fixes it:
> >
> > --- dlls/ntdll/threadpool.c.org 2010-05-02 22:37:08.000000000 +0200
> > +++ dlls/ntdll/threadpool.c 2010-05-02 22:46:45.000000000 +0200
> > @@ -427,6 +427,9 @@
> >
> > TRACE( "(%p, %p, %p, %p, %d, 0x%x)\n", NewWaitObject, Object, Callback,
> Context, Milliseconds, Flags );
> >
> > + if (!Milliseconds)
> > + return RPC_NT_INVALID_TIMEOUT;
> > +
> > wait_work_item = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*wait_work_item) );
> > if (!wait_work_item)
> > return STATUS_NO_MEMORY;
> >
> > On a related note, whitout this patch wineserver also goes into an endless
> > loop, doing brk() calls over and over until memory is exausted. Seems
> > like a bug that too.
> This looks like something you should post to wine-devel.
Right, posting there but with a new patch. I think the orginal fix was wrong.
Here is a new one:
More information about the wine-devel
mailing list