Bug 1420440 - libbson-1.5.3-1.fc26 FTBFS: tests fail with GCC 7
Summary: libbson-1.5.3-1.fc26 FTBFS: tests fail with GCC 7
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libbson
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://jira.mongodb.org/browse/CDRIV...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-08 16:22 UTC by Petr Pisar
Modified: 2017-02-09 11:19 UTC (History)
2 users (show)

Fixed In Version: libbson-1.5.3-2.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-09 11:19:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2017-02-08 16:22:27 UTC
libbson-1.5.3-1.fc26 fails to build in F26 because tests crash with SIGABORT. This is cause by upgrading gcc from 6.3.1-2.fc26 to 7.0.1-0.2.fc26 and it is caused by out-optimized signed integer wrap:

    { "status": "PASS", "test_file": "/bson/append_int32", "seed": "2751394709", "start": 26100.175135173, "end": 26101.052242048, "elapsed": 0.877106875 },
src/bson/bson-timegm.c:644:7: runtime error: signed integer overflow: 4611686018427387904 * 2 cannot be represented in type 'long int'
    { "status": "PASS", "test_file": "/bson/iso8601/utc", "seed": "1303037762", "start": 26100.226295036, "end": 26101.076501063, "elapsed": 0.850206027 },

    /*
    ** Do a binary search (this works whatever time_t's type is).
    */
    if (!TYPE_SIGNED(time_t)) {
        lo = 0;
        hi = lo - 1;
    } else {
        lo = 1;
        for (i = 0; i < (int) TYPE_BIT(time_t) - 1; ++i)
→           lo *= 2;
        hi = -(lo + 1);
    }


Note You need to log in before you can comment on or make changes to this bug.