LLNL/GridDyn

sundialsJac does not consistently check for null dstate_dt

mcneish1 opened this issue · 0 comments

In griddyn/solvers/sundialsInterface.cpp, sundialsJac is allowed to be passed a null dstate_dt. It acknowledges this here and here.

However,

NVECTOR_DATA (sd->use_omp, dstate_dt), filterAd, cj, sd->mode);

and

NVECTOR_DATA (sd->use_omp, dstate_dt), *a1, cj, sd->mode);

do not check for this, and can segfault. These should have the same nullptr check as above.