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
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: 2024-05-20 21:58 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.
Comment 4 Larry the Git Cow gentoo-dev 2024-05-20 21:58:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1278bddfdb2767fd0a4fe29d2a15ef1ad7a7c360

commit 1278bddfdb2767fd0a4fe29d2a15ef1ad7a7c360
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-05-20 01:59:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-20 21:56:53 +0000

    dev-vcs/cvs: update patch that modifies configure to also modify m4
    
    This means that if we ever run eautoreconf, the changes don't disappear.
    
    Bug: https://bugs.gentoo.org/570208
    Fixes: 8c48112665e85affda864ff1ffa119ab78e3e40d
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/cvs-1.12.12-mktime-configure-m4.patch    | 412 +++++++++++++++++++++
 1 file changed, 412 insertions(+)