-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segfault in shift_remainders() when empty_index < start_index #9
Comments
Hi @koadman , Could you please share the code to reproduce the bug? Thanks, |
Hi Prashant thanks for the quick reply. I've had some difficulty isolating the exact same conditions from the rest of the codebase I'm working on but have now found two small-ish test cases that reproduce what look like a very similar or possibly the same issue.
with gcc version 5.4.0 20160609 on intel x64.
The interesting thing is that if I comment out the code block that creates and loads keys to the first QF, then the 2nd QF does not segfault. Possibly there is some global or file-scoped variable that's creating an unexpected dependency between the two QFs? |
The second, possibly related problem I have isolated into a small test example happens when merging two QFs. As above, compiling with:
and running:
cqf_debug2.cpp.gz interestingly, I see a similar behavior as before, where if I comment out the merge of the first two QFs then the 2nd merge is able to complete successfully, otherwise it segfaults. |
quick update: i still have these problems. I have been able to work around them by doing two things:
of course a solution that eliminates the segfault would be preferable! |
Hey, |
cool! maybe send a pull request? |
I've been experiencing segfaults in shift_remainders(), and it seems to be happening because the value of empty_index is less than start_index, when called from line 1372 (from within insert1()).
I'm just getting started with cqf and it's quite possible that I've misunderstood something in the API. The keys I'm inserting to the QFs should all be within the allowable range, and I am not storing values, just keys. I've enabled auto resizing, and these crashes are happening during qf_resize_malloc.
Am I doing something wrong, or is this a bug?
The text was updated successfully, but these errors were encountered: