GridDyn
GridDyn copied to clipboard
sundialsJac does not consistently check for null dstate_dt
In griddyn/solvers/sundialsInterface.cpp, sundialsJac is allowed to be passed a null dstate_dt. It acknowledges this here and here.
However,
https://github.com/LLNL/GridDyn/blob/cf850abcc921f9f1bfea917ffc03a966d64c0a6a/src/griddyn/solvers/sundialsInterface.cpp#L462
and
https://github.com/LLNL/GridDyn/blob/cf850abcc921f9f1bfea917ffc03a966d64c0a6a/src/griddyn/solvers/sundialsInterface.cpp#L471
do not check for this, and can segfault. These should have the same nullptr check as above.