-
Notifications
You must be signed in to change notification settings - Fork 1k
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
A bug in sparse matrix nonzeros counter #954
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I believe that there is a bug in the num_nonzeros_ counter in the block_sparse_matrix.cc . There is a check for integer overflow in the constructor. This is OK. But this check is missing in the case where the counter is incremented e.g. in AppendRows() . As a result there are cases of num_nonzeros_ < 0 which results in undefined behavior. This problem is maybe also relevant in other types of matrices where nonzeros counter is used.
The text was updated successfully, but these errors were encountered: