Skip to content
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

Fixed out-of-bounds read in read_mtx() #452

Merged
merged 1 commit into from
Aug 16, 2019

Conversation

brian-kelley
Copy link
Contributor

read_mtx() loads a list of (row,col) pairs, sorts them, and then inserts
into the CRS structure one row at a time. The loop over entries in the
current row only checked if the next entry matches the current row, but NOT
that the end of the pair array has been reached. This caused an invalid
read just after inserting the last entry in the matrix.

read_mtx() loads a list of (row,col) pairs, sorts them, and then inserts
into the CRS structure one row at a time. The loop over entries in the
current row only checked if the next entry matches the current row, but NOT
that the end of the pair array has been reached. This caused an invalid
read just after inserting the last entry in the matrix.
@brian-kelley
Copy link
Contributor Author

I'll run the spot check as soon as the SPMV test errors on kokkos-dev are fixed, but this is a simple enough change that it could probably be merged as is.

Copy link
Contributor

@srajama1 srajama1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brian-kelley Thanks !

@srajama1
Copy link
Contributor

Can you also add an issue for this, so we keep track of the fixes for next release. If you can report the spot-check, I am ok with merging if it is only the spmv ones failing. @lucbv : Can you take care of the spmv tests quickly, it is blocking any new push into KK now.

@srajama1
Copy link
Contributor

@brian-kelley : I should have said in this particular instance, I am ok with merging even if spmv fails. We need to clean up illegal memory accesses for the customer as quickly as we can.

@brian-kelley
Copy link
Contributor Author

@srajama1 Created issue #453, and running the checks.

@lucbv
Copy link
Contributor

lucbv commented Aug 16, 2019

@srajama1 I reproduced the error on kokkos-dev and my local workstation.
I am working on the fix now.

@brian-kelley
Copy link
Contributor Author

#######################################################
PASSED TESTS
#######################################################
clang-4.0.1-Pthread_Serial-hwloc-release build_time=856 run_time=423
clang-4.0.1-Pthread_Serial-release build_time=880 run_time=586
cuda-8.0.44-Cuda_OpenMP-release build_time=1971 run_time=770
gcc-5.3.0-Serial-hwloc-release build_time=473 run_time=184
gcc-5.3.0-Serial-release build_time=476 run_time=185
gcc-7.2.0-Serial-hwloc-release build_time=419 run_time=160
gcc-7.2.0-Serial-release build_time=414 run_time=158
#######################################################
FAILED TESTS
#######################################################
intel-17.0.1-OpenMP-hwloc-release (test failed)
intel-17.0.1-OpenMP-release (test failed)

[ FAILED ] 2 tests, listed below:
[ FAILED ] openmp.sparse_spmv_struct_double_int64_t_int_TestExecSpace
[ FAILED ] openmp.sparse_spmv_struct_double_int64_t_size_t_TestExecSpace

@srajama1
Copy link
Contributor

In general it is better to a white spot check too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants