Re: Potential bug in RtlRegisterWait()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Chip


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux