Check return value of mallocs in check_zmatrices() and prevent overflows
All threads resolved!
All threads resolved!
In the same vein of !330 (merged), an overflow in the malloc
s in the function to check the result of computations was leading to a negative value and malloc returning NULL.
This MR adds a check of returned values by mallocs (not sure if returning CHAMELEON_ERR_OUT_OF_RESOURCES
is the best solution in case of error) and use long
s instead of int
s for variables used to compute the memory malloc
has to allocate.
I found this bug with the following command:
./testing/chameleon_stesting -o lacpy --n 3200:60000:6400 -H -c --nowarmup
The execution is very long for the matrix size 48000 and actually ends with a segfault (in the BLAS library!) when performing the check.
Merge request reports
Activity
added Bug label
assigned to @pswartva
unassigned @pswartva
- Resolved by Mathieu Faverge
- Resolved by Mathieu Faverge
added 5 commits
-
6a680006...903ad11c - 4 commits from branch
solverstack:master
- 9a3b84d9 - Check return value of mallocs in check_zmatrices() and prevent overflows
-
6a680006...903ad11c - 4 commits from branch
mentioned in commit ccc74c05
Please register or sign in to reply