None
closed
nobody
None
6 days ago
2018-05-09
Anonymous
No

$ 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
    Vaibhav
    2018-05-10

    Did 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.

     
  • medoc
    medoc
    2018-05-13

    Thanks 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
    medoc
    2018-05-13

    I 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.

    https://bugzilla.redhat.com/show_bug.cgi?id=1577613

     
  • medoc
    medoc
    6 days ago

    You are welcome :) Thanks for reporting the problem.

     
  • medoc
    medoc
    6 days ago

    • status: open --> closed
    • milestone: -->
     

Cancel   Add attachment