forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 145
Refactor: decrease uninitialized member values and the risk of memory leaks in abacus #5755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
mohanchen
reviewed
Dec 28, 2024
mohanchen
reviewed
Dec 28, 2024
mohanchen
approved these changes
Dec 31, 2024
Fisherd99
pushed a commit
to Fisherd99/abacus-BSE
that referenced
this pull request
Mar 31, 2025
… leaks in abacus (deepmodeling#5755) * init variable and fix memory leak bug in module_base * fix uninit member var in module_basis * chang logic bug and uninit memeber value in the module cell * chang logic bug and uninit memeber value in the module_elecstate * chang logic bug and uninit memeber value in the module_eslover * chang memory leak risk and uninit memeber value in the module_hamilt_general * chang uninit memeber value in the module_hamilt_lcao * chang uninit memeber value in the module_hamilt_pwdft * fix in klist * [pre-commit.ci lite] apply automatic fixes * fix useless assert * revert change in read_pp_upf100.cpp * change uninit memeber value in module_hamilt_pw * change uninit memeber value in module_hsolver * change uninit memeber value in module_io * change uninit memeber value in module_md and module_relax * [pre-commit.ci lite] apply automatic fixes * update nnr init data * fix uninit member value * update value in elecstate_energy.cpp * add init parameter for construct in sto_func * add value in the construct file * [pre-commit.ci lite] apply automatic fixes * change magnetism.cpp * [pre-commit.ci lite] apply automatic fixes * modify logic of elecstate_energy.cpp --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Unit Tests and/or Case Tests for my changes
What's changed?
with the check of the Tscancode,most of the init value has been delete.
before
after:The remaining part does not show any issues. It was a false alarm in the code check. There might be some grammatical format issues that can be reviewed again
