[vlc-devel] Re: Win32 implementation of mdate breaks for large values returned by QueryPerformanceCounter (suspected due to a buggy gcc optimization), causing video stream playback to fail on Windows systems with a large uptime

Damien Fouilleul Damien.Fouilleul at laposte.net
Wed Jan 10 23:43:30 CET 2007


Rémi Denis-Courmont wrote:
> Le mardi 9 janvier 2007 06:30, Skywing a écrit :
>   
>> There's sign extension & data loss bug in the Win32 implementation of
>> mdate (src\misc\mtime.c) that appears to be introduced by aggressive
>> gcc optimizations.  I don't have a cygwin build environment
>> installed, so I am just dropping a mail to explain the problem and
>> what likely needs to be done to fix it.
>>     
>
> Thanks for the thorough bug report.
>
> Unfortunately, the badly-optimized double-division was precisely 
> intended to avoid miscalculation with large values (as the comment 
> notes anyway), which happens if the division is done in a single step. 
> In other words, the previous implementation was really broken, and the 
> new one is broken by gcc.
>
> I feel I have wasted enough time on this already myself, to not take gcc 
> bugs into account in addition, particularly while I do not even use 
> Win32. Plus I do not have the necessary background to check for gcc 
> bugs.
>
>   
i've looked at the asssembly version of that code compiled through 
cygwin latest gcc, and i don't see the optimization problem.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list