Closed duckunix closed 3 years ago
I've only seen this when building for Fedora so far (and since this build is only conduced on OBS I couldn't figure out what's wrong). It would be useful to have a stack trace.
Hi, same issue here. Test case of Debug build says this:
Executing test cases ...
.................
output for formatting with ANSI escape codes:
Error: some error
Warning: some warning
Info: some info
==> ERROR: Arch-style error
==> WARNING: Arch-style warning
Arch-style message
==> Arch-style success
-> Arch-style sub-message
blue, blinking text on red background
---------------------------------------------
............/usr/include/c++/10.2.0/bits/basic_string.h:1038: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference = char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]: Assertion '__pos <= size()' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff7b97ef5 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff7b97ef5 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff7b81862 in abort () from /usr/lib/libc.so.6
#2 0x00007ffff7f3489a in std::__replacement_assert (__file=__file@entry=0x7ffff7f4f530 "/usr/include/c++/10.2.0/bits/basic_string.h", __line=__line@entry=1038,
__function=__function@entry=0x7ffff7f4f378 "std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _Ch"..., __condition=__condition@entry=0x7ffff7f4f018 "__pos <= size()")
at /usr/include/c++/10.2.0/x86_64-pc-linux-gnu/bits/c++config.h:457
#3 0x00007ffff7f2cf95 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[] (__pos=<optimized out>, this=0x7fffffffc900)
at /usr/include/c++/10.2.0/bits/basic_string.h:1038
#4 0x00007ffff7f33a8f in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[] (__pos=<optimized out>, this=0x7fffffffc900)
at /usr/include/c++/10.2.0/bits/basic_string.h:313
#5 CppUtilities::ArgumentParser::printBashCompletion (this=this@entry=0x7fffffffd810, argc=argc@entry=1, argv=argv@entry=0x7fffffffcac8,
currentWordIndex=currentWordIndex@entry=0, reader=...) at application/argumentparser.cpp:1514
#6 0x00005555555cd764 in ArgumentParserTests::testBashCompletion (this=0x7fffffffca80) at tests/argumentparsertests.cpp:548
#7 0x00007ffff7f827d1 in CppUnit::TestCaseMethodFunctor::operator()() const () from /usr/lib/libcppunit-1.15.so.1
#8 0x00007ffff7f790d1 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) () from /usr/lib/libcppunit-1.15.so.1
#9 0x00007ffff7f7ff78 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) () from /usr/lib/libcppunit-1.15.so.1
#10 0x00007ffff7f8a1f7 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libcppunit-1.15.so.1
#11 0x00007ffff7f8256d in CppUnit::TestCase::run(CppUnit::TestResult*) () from /usr/lib/libcppunit-1.15.so.1
#12 0x00007ffff7f82b03 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) () from /usr/lib/libcppunit-1.15.so.1
#13 0x00007ffff7f82c69 in CppUnit::TestComposite::run(CppUnit::TestResult*) () from /usr/lib/libcppunit-1.15.so.1
#14 0x00007ffff7f82b03 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) () from /usr/lib/libcppunit-1.15.so.1
#15 0x00007ffff7f82c69 in CppUnit::TestComposite::run(CppUnit::TestResult*) () from /usr/lib/libcppunit-1.15.so.1
#16 0x00007ffff7f89873 in CppUnit::TestResult::runTest(CppUnit::Test*) () from /usr/lib/libcppunit-1.15.so.1
#17 0x00007ffff7f8c240 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
from /usr/lib/libcppunit-1.15.so.1
#18 0x00007ffff7f8e012 in CppUnit::TextTestRunner::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool, bool) ()
from /usr/lib/libcppunit-1.15.so.1
#19 0x00005555555878a2 in main (argc=<optimized out>, argv=<optimized out>) at tests/./cppunit.h:78
Oddly enough, on another computer the test case passes. In case the CPU matters: the computer where the test passes has an Intel i7-3610QM; the one where it fails has an AMD Ryzen 5 1600X.
Edit: running up-to-date ArchLinux too.
It doesn't fail on any of my systems (which have various different CPUs) but I'll have a look at the functions the backtrace is pointing to. (I previously saw failures within my builds on OBS but couldn't debug them.)
For information, the previous version (5.10.1) is ok: test case passes without crash. (but maybe the crash in 5.10.2 happens in a test that did not exist in 5.10.1)
I pushed a commit which should fix this. The backtrace was very useful.
It appears to be fixed indeed.
Tried makepkg
(AUR tool) to build from git sources: the test does now pass (and was still failing before the latest commit).
No issue installing the latest 5.10.3-1 package on ArchLinux for me. Thank you for your tools, and the fix.
Good. The crashes I've observed on OBS within the Fedora builds are gone as well. So I'm closing the issue.
x86_64, Arch fully up-to-date before running install. I get the following errors: