Re: Found infinite looping in libCurl version 7.55.1
Date: Mon, 3 Feb 2020 10:28:02 -0500
Thanks, Daniel, for the prompt response. And, sorry about my late response.
I have been *able to reproduce* the issue by using a mock version of
GetTickCount() that would roll over to 0 in 5 minutes from first use
(though it didn't happen every time with my app). Since we don't want to
upgrade to the last version of libcurl right now, I've recompiled libcurl
7.55.1 with some changes to force the use of GetTickCount64(), with the
caveat that it needs to run on Windows 2008 or later. JFYI, because I had
compile issues with VS 2013 that we use for building our code, I stuck with
VS 2005 to build libcurl, but I had to add Windows Kit 8.1 directories to
the project to make it build.
> It is not a known issue but having the time wrap and start over at zero
> like something that could be problematic.
> > If so, is there a fix for it?
> Current libcurl doesn't use GetTickCount() if you run on Vista or later so
> should already be avoided. For older systems there's no fix as far as I
> > Now, I've checked timeval.c in 7.55.1, and realized that
> > would have been used instead, if _WIN32_WINNT and _WIN32_WINNT_VISTA had
> > been defined to the correct values. It's not clear to me where/how
> > macros are to be defined, though. Is there a configuration option for
> > in the build? If not, could I simply define these in config-win32.h?
> > I had compiled libcurl on Window 2008 using Visual Studio 2005, and
> > obviously these macros were not defined at all.
> I don't remember what 7.55.1 did.
> > If this issue could not be due to time value rolling over problem, is
> > any other known issues that would explain this infinite looping? What
> > could I do to debug this further?
> I'm not aware of any infinite looping bug mentioned in recent years until
> mail here.
> To debug it, I would first try hard to reproduce (possibly by writing a
> version of GetTickCount() for curl). Then when reproduced, see if a
> libcurl is likely to have similar logic that can be tricked in the same or
> similar ways.
Received on 2020-02-03