Downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1637614
Fedora 29 and above now compiles source with -Wp,-D_GLIBCXX_ASSERTIONS (see: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html ) , and now some people complains that onboard-1.4.1 crashes at startup like:
/usr/include/c++/8/bits/stl_vector.h:950: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = unsigned int; _Alloc = std::allocator<unsigned int>; std::vector<_Tp, _Alloc>::const_reference = const unsigned int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.
Aborted (core dumped)
Short backtrace:
Thread 1 (Thread 0x7ffff78ac600 (LWP 5297)):
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
set = {__val = {0, 9223372036854775807, 140737353566448, 140737353566448, 7236832952344083535, 448629667699, 0, 0, 0, 11007238138408362752, 140737351647232, 50, 140737058394544, 140737488334688, 41, 9}}
pid = <optimized out>
tid = <optimized out>
ret = <optimized out>
#1 0x00007ffff78cf895 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x3b6, sa_sigaction = 0x3b6}, sa_mask = {__val = {140737055462496, 140737055451432, 93825004148120, 0, 0, 93825004146760, 8, 0, 0, 0, 140737088396060, 93825004146848, 140737055406894, 0, 0, 0}}, sa_flags = 0, sa_restorer = 0x555555918f0c}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007fffe6309cb8 in std::__replacement_assert (__file=__file@entry=0x7fffe6326958 "/usr/include/c++/8/bits/stl_vector.h", __line=__line@entry=950, __function=__function@entry=0x7fffe6329460 <std::vector<unsigned int, std::allocator<unsigned int> >::operator[](unsigned long) const::__PRETTY_FUNCTION__> "std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = unsigned int; _Alloc = std::allocator<unsigned int>; std::vector<_"..., __condition=__condition@entry=0x7fffe6326928 "__builtin_expect(__n < this->size(), true)") at /usr/include/c++/8/x86_64-redhat-linux/bits/c++config.h:2389
No locals.
#3 0x00007fffe6320f67 in std::vector<unsigned int, std::allocator<unsigned int> >::operator[] (__n=0, this=0x7fffffffb0f0) at /usr/include/c++/8/ext/new_allocator.h:86
__PRETTY_FUNCTION__ = "std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = unsigned int; _Alloc = std::allocator<unsigned int>; std::vector<_"...
#4 NGramTrie<TrieNode<TrieNodeKNBase<RecencyNode> >, BeforeLastNode<BeforeLastNodeKNBase<RecencyNode>, LastNode<RecencyNode> >, LastNode<RecencyNode> >::add_node (wids=std::vector of length 0, capacity 0, this=0x5555560b1084) at Onboard/pypredict/lm/lm_dynamic.h:489
No locals.
#5 NGramTrieKN<TrieNode<TrieNodeKNBase<RecencyNode> >, BeforeLastNode<BeforeLastNodeKNBase<RecencyNode>, LastNode<RecencyNode> >, LastNode<RecencyNode> >::increment_node_count (this=0x5555560b1084, node=0x555555918f0c, wids=0x55555578c2c0, n=1, increment=1) at Onboard/pypredict/lm/lm_dynamic_kn.h:126
wxr = std::vector of length 0, capacity 0
nd = <optimized out>
#6 0x00007fffe631f3eb in _DynamicModel<NGramTrieRecency<TrieNode<TrieNodeKNBase<RecencyNode> >, BeforeLastNode<BeforeLastNodeKNBase<RecencyNode>, LastNode<RecencyNode> >, LastNode<RecencyNode> > >::count_ngram (this=0x5555560b1040, wids=0x55555578c2c0, n=1, increment=1) at Onboard/pypredict/lm/lm_dynamic_impl.h:270
i = <optimized out>
node = 0x555555918f0c
count = <optimized out>
#7 0x00007fffe63183a1 in _DynamicModel<NGramTrieRecency<TrieNode<TrieNodeKNBase<RecencyNode> >, BeforeLastNode<BeforeLastNodeKNBase<RecencyNode>, LastNode<RecencyNode> >, LastNode<RecencyNode> > >::count_ngram (this=0x5555560b1040, ngram=0x7fffffffb260, n=1, increment=1, allow_new_words=<optimized out>) at /usr/include/c++/8/bits/stl_vector.h:930
wids = std::vector of length 1, capacity 1 = {0}
#8 0x00007fffe630c478 in DynamicModelBase::assure_valid_control_words (this=0x5555560b1040) at /usr/include/c++/8/bits/stl_vector.h:979
i = <optimized out>
words = {0x7fffe6326990 L"<unk>", 0x7fffe63272e4 L"<s>", 0x7fffe63272f4 L"</s>", 0x7fffe6327308 L"<num>"}
i = <optimized out>
Full backtrace with "thread apply all bt full"