evaleev / libint

Libint: high-performance library for computing Gaussian integrals in quantum mechanics
Other
229 stars 95 forks source link

Memory leak in simplified fock routine #263

Closed roman-ellerbrock closed 10 months ago

roman-ellerbrock commented 1 year ago

compute_2body_fock_simple currently contains a memory leak: buf_1324 can be null if all integrals are screened out. I added the same check that is currently being used for buf_1234 to avoid segfaults.

I produced a segfault by running Hartree Fock with compute_2body_fock_simple with sto-3g.

loriab commented 1 year ago

Mac tests on master have been failing for a while, I think, so not your PRs fault. There's a few pybind11 hacks to make the rather old version the buildsys uses by default work.

roman-ellerbrock-tq commented 1 year ago

The MacOS tests should not be affected by this change, I (from my private account) simply added a check for the simplified Hartree fock routine that avoids buffer overflow.