vigna / sux

Succinct data structures in C/C++
Other
82 stars 17 forks source link

Segmentation fault in RecSplit #7

Closed jnalanko closed 4 years ago

jnalanko commented 4 years ago

Hello,

I have the following code:

#include "sux/function/RecSplit.hpp"

using namespace sux::function;

int main() {
    vector<hash128_t> keys;
    for (int i = 0; i < 10000; i++) {
        keys.push_back(hash128_t(0, i));
    }
    RecSplit<8> RS(keys, 100);
}

Compiled with g++ -std=c++17, this crashes with a segmentation fault. If the loop goes up to only 1000, it works. Why is that? Thanks.

vigna commented 4 years ago

Please read the docs.

/* 128-bit hashes.

jnalanko commented 4 years ago

Sorry and thank you!