-
Notifications
You must be signed in to change notification settings - Fork 134
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
Assertion '__builtin_expect(__n < this->size(), true)' failed. #31
Comments
Thanks! As @msoos figured out in msoos/cryptominisat#643 this is detected by adding the Then fuzzing with 'mobical' would immediately find small traces like this one:
This is also in the latest release (1.4.0) which is used for the SAT competition CaDiCaL Hack track.
I can also confirm that the issue is not found by ASAN with other extensive testing I do. |
In vivification, the code which tries to reuse decisions for a new clause to be vivified assumed that there was at least one decision left from the last try, i.e., the decision level is (still) non-zero. This is not the case in general though, and thus it might happen that the control strack (which has the same size as the number of decisions plus one) shrinks to just the root-level frame, in which case the search starting at decision level one accesses an element of that control stack which was just popped. So the 'std::vector' shrinks from size 2 to size 1 and then accessing it at position 1 is correctly an out-of-bound access, but apparently the STL implementation of 'std::vector' neither moved the array nor used realloc or something (which is the sane thing to do when shrinking a vector from 2 to 1). So that was (correctly) not detected by ASAN nor 'valgrind', but in principle could lead to a real issue since it violates STL 'std::vector' semantics (as complex they are). The contract checker for STL enabled with For now I keep the fix on the development branch (and make it nicer when adding it to the next release). I will add |
Merged with sc2021 version. |
Hi, with cadical-1.3.0 (as packaged for Fedora 33 GNU/Linux) I am getting
when called with no arguments (with
--sat
it's fine)testcase.log
testcase.cnf.txt
Looks identical to msoos/cryptominisat#643
The text was updated successfully, but these errors were encountered: