GridDyn icon indicating copy to clipboard operation
GridDyn copied to clipboard

sundialsJac does not consistently check for null dstate_dt

Open mcneish1 opened this issue 6 years ago • 0 comments

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.

mcneish1 avatar Sep 09 '19 17:09 mcneish1