bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH]: update tls and lock tests, gl_cond_t WIN32 implementation


From: Bruno Haible
Subject: Re: [PATCH]: update tls and lock tests, gl_cond_t WIN32 implementation
Date: Sun, 12 Oct 2008 17:34:30 +0200
User-agent: KMail/1.5.4

Yoann Vandoorselaere wrote:
> >     during this conversion an integer overflow could occur in at least 2 
> > places
> >     (1. result->tv_sec = x->tv_sec - y->tv_sec
> >      2. (res.tv_sec * 1000) + (res.tv_usec / 1000)).
> 
> You might want to push your #1 changes up to the GLIBC team: the
> timeval_subtract function is provided from the LIBC documentation:
> 
> http://www.gnu.org/software/libtool/manual/libc/Elapsed-Time.html

Hmm, maybe that code assumes that the tv_sec field cannot be < 0. Then
there is no integer overflow at 1., only at 2.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]