Bug 1551147
Summary: | cmake -E cmake_autogen crashing (probably due to build with GCC 8) | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Rex Dieter <rdieter> | ||||
Component: | cmake | Assignee: | Orion Poplawski <orion> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 28 | CC: | awilliam, besser82, dmalcolm, jreznik, jwakely, orion, rdieter, sebholt, walter.pete | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | cmake-3.10.2-4.fc29 cmake-3.10.2-4.fc28 cmake-3.11.0-1.fc27 cmake-3.11.0-1.fc28 cmake-3.11.0-1.fc26 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-03-30 12:48:25 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1551148 | ||||||
Attachments: |
|
Description
Rex Dieter
2018-03-02 21:42:51 UTC
It'd be good to do the build in a mock chroot, get the actual core dump out, and gdb it. I'll try and do that later today. Created attachment 1404572 [details]
backtrace
Here's a backtrace I got by running the crashing cmake command through gdb.
(In reply to Adam Williamson from comment #2) > Created attachment 1404572 [details] > backtrace > > Here's a backtrace I got by running the crashing cmake command through gdb. Frames 2 and 3 looks like an assertion failure inside std::string::front: /** * Returns a read/write reference to the data at the first * element of the %string. */ reference front() { __glibcxx_assert(!empty()); return operator[](0); } Looks like frame 4 (ReadFile in cmake-3.10.2-2.fc29.x86_64/Source/cmQtAutoGenerators.cxx) is trying to get at the first char of a string, but the string is empty, hence the assertion failure. Hi. I'm the current maintainer of AUTOMOC. Thanks for the backtrace. There's a CMake issue now: https://gitlab.kitware.com/cmake/cmake/issues/17793 jwakely: I believe this assert dates back to 2015-09-09 and is controlled by #if defined(_GLIBCXX_ASSERTIONS) Is _GLIBCXX_ASSERTIONS normally defined, or is that something that we only turn on during bring-up of a new version of gcc? Thanks. Florian enabled it in rawhide recently, as it's like the libstdc++ equivalent of _FORTIFY_SOURCE. (and it's useful, because it finds undefined behaviour like this package bug). Thanks (In reply to Sebastian Holtermann from comment #4) > Hi. I'm the current maintainer of AUTOMOC. > > Thanks for the backtrace. > > There's a CMake issue now: > https://gitlab.kitware.com/cmake/cmake/issues/17793 You could also avoid calling front() entirely: content.reserve(length); content.assign(std::istreambuf_iterator<char>{ifs}, {}); I've gone with Jonathan's change (I think): diff -up cmake-3.10.2/Source/cmQtAutoGenerators.cxx.automoc cmake-3.10.2/Source/cmQtAutoGenerators.cxx --- cmake-3.10.2/Source/cmQtAutoGenerators.cxx.automoc 2018-01-18 07:48:42.000000000 -0700 +++ cmake-3.10.2/Source/cmQtAutoGenerators.cxx 2018-03-08 21:09:50.451726324 -0700 @@ -80,8 +80,8 @@ static bool ReadFile(std::string& conten std::size_t const length = cmSystemTools::FileLength(filename); cmsys::ifstream ifs(filename.c_str(), (std::ios::in | std::ios::binary)); if (ifs) { - content.resize(length); - ifs.read(&content.front(), content.size()); + content.reserve(length); + content.assign(std::istreambuf_iterator<char>{ifs}, {}); if (ifs) { success = true; } else { for 3.10.2 for now as upstream's fix is for 3.11 and the relevant code appears to have been refactored significantly. It's building now in rawhide. Let me know if it fixes the digikam build and I'll make an update for f28. After I actually pushed and built Orion's change, fix confirmed: digikam built successfully for F29. Please send to F28. cmake-3.10.2-4.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-2d5a4c2dab cmake-3.10.2-4.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-2d5a4c2dab cmake-3.11.0-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e899ee34bf cmake-3.11.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-926e88d126 cmake-3.11.0-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d9a3a285b1 cmake-3.11.0-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e899ee34bf cmake-3.11.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-926e88d126 cmake-3.11.0-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-d9a3a285b1 cmake-3.10.2-4.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. cmake-3.11.0-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report. cmake-3.11.0-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. cmake-3.11.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report. |