Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570208 - dev-vcs/cvs-1.12.12-r10: mktime conftest stuck in almost infinite loop
Summary: dev-vcs/cvs-1.12.12-r10: mktime conftest stuck in almost infinite loop
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Maintainers for cvs, and cvs related tools (the version control system) [OBSOLETE]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-30 06:39 UTC by Raymond Jennings
Modified: 2016-02-28 04:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (einfo.txt,5.43 KB, text/plain)
2015-12-30 06:40 UTC, Raymond Jennings
Details
conftest.c (conftest.c,6.40 KB, text/plain)
2015-12-30 07:43 UTC, nvinson234
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raymond Jennings 2015-12-30 06:39:51 UTC
a very long freeze during build

Reproducible: Always

Steps to Reproduce:
1.  emerge cvs

Actual Results:  
long long pause (a minute or two), with 100 percent CPU.  I spotted also a HUGE recursive nesting of directories (about 50 or so) with the same base name

Expected Results:  
a simple build
Comment 1 Raymond Jennings 2015-12-30 06:40:36 UTC
Created attachment 421160 [details]
emerge --info
Comment 2 nvinson234 2015-12-30 07:43:00 UTC
Created attachment 421162 [details]
conftest.c

Shentino asked about this in #gentoo, so I asked for his conftest.c.  This is the conftest.c Shentino posted.

In short, this is an undefined behavior bug caused by a bad mktime() test (the for loop at line 250 overflows a signed int).  The test came from Autoconf 2.59.  I think this is really an upstream issue.

However, one possible fix would be to update the ebuild to require a newer autoconf and regenerate the configure script.  I know 2.69 wouldn't suffer from the UB issue, and older versions of autoconf (that are > 2.59) may be good as well.