[pull] develop from lammps:develop - #174
Merged
Merged
Conversation
FixNVESpin::init() runs once per run command, so every run after the first orphaned the previous rsec allocation.
The second pass assigns fp only for those local densities that apply to the type of the central atom, but the force loop reads all of them, so the array must be zeroed first. The non-threaded pair style does this already.
A second pair_coeff command orphaned the entire set of tabulated arrays.
…g them A second pair_style command leaked the previous generator: randomT in pair style edpd, random in pair style sdpd/taitwater/isothermal.
The constructors declared a local variable of the same name, so the member stayed uninitialized until the first compute, while memory_usage() reads it as early as the first thermo output.
…the grid ngrid is set by allocate(), which ran after the statistics were printed, so the reported number of 3d grid values was undefined on the first run. Both PPPM and PPPMDipole have these two blocks in the opposite order.
Atoms without an entry in the Ellipsoids section kept an undefined radius, which was then written to restart and dump files.
write_restart_settings() stores all 100 entries, not only those set with the ecp keyword, so it wrote undefined data to the restart file.
Clearing input->arg orphaned the argument list that Input frees on delete.
Memory that is still reachable when the process exits is not a leak. Those reports bury the actual defects under thousands of one-time initializations in OpenSSL, libcurl, CPython and GoogleTest and under everything that is still in use when a command like quit terminates the process on purpose. MEMORYCHECK_COMMAND_OPTIONS is a cache variable, so existing build folders keep their current setting and have to be updated explicitly with cmake -D MEMORYCHECK_COMMAND_OPTIONS="..." <builddir>
Fix memory leaks and uninitialized memory access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )