$ recoll
/usr/include/c++/8/bits/stl_vector.h:932: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator [with _Tp = regmatch_t; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::reference = regmatch_t&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion 'builtin_expect(n < this->size(), true)' failed.
Aborted (core dumped)
Discussion
-
Vaibhav
2018-05-10Did some quick debugging and discovered that with libstdc++ 6.0 this expression '&m->matches[0]' in SimpleRegexp::simpleMatch to retrieve the address of the internal
vector buffer is failing.Though as per the vector class specification the call to overloaded
vector::operator[] should do subscript check but in this case it seems
to be happening and a cause for further investigation. In the mean
time using the vector::data() function to access the internal vector
buffer seems to have made this error go away.I have attached a patch to the source to fix this issue based on above observation.
Attachments
-
medoc
2018-05-13Thanks for taking the time to debug this! This is really weird, because the vector is guaranteed to be of size 1 at least (because of the call to reserve(nmatch+1) in the constructor). I don't understand, so I'm installing Fedora 28 to investigate a bit further.
-
medoc
2018-05-13I just pushed a slightly different change to the repository. The crash was caused by a problem in the recoll code, which had no consequences for slightly complicated, but solid reasons, but which triggered a c++ lib assertion.
I reported the problem and solution to Fedora and I hope that there should be an updated RPM shortly.
-
Anonymous
2018-05-14Thank you all very much for the quick response and solution.
-
medoc
2018-05-16You are welcome :) Thanks for reporting the problem.
-
medoc
2018-05-16- status: open --> closed
- milestone: -->