Skip to content
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

Fix memory issues found using Valgrind ECFLOW-1969 #114

Merged
merged 12 commits into from
Sep 3, 2024

Conversation

marcosbento
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 4.25532% with 45 lines in your changes missing coverage. Please review.

Please upload report for BASE (hotfix/5.13.4@580276b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
Viewer/ecflowUI/src/ModelColumn.cpp 0.00% 11 Missing ⚠️
Viewer/ecflowUI/src/ChangeNotify.cpp 0.00% 4 Missing ⚠️
Viewer/ecflowUI/src/TreeNodeWidget.cpp 0.00% 4 Missing ⚠️
Viewer/ecflowUI/src/InfoProvider.cpp 0.00% 3 Missing ⚠️
Viewer/libViewer/src/IconProvider.cpp 0.00% 3 Missing ⚠️
libs/node/src/ecflow/node/ExprDuplicate.cpp 40.00% 3 Missing ⚠️
Viewer/ecflowUI/src/NodeQuery.hpp 0.00% 2 Missing ⚠️
Viewer/ecflowUI/src/OutputDirWidget.cpp 0.00% 2 Missing ⚠️
Viewer/ecflowUI/src/OutputFetchInfo.cpp 0.00% 2 Missing ⚠️
Viewer/ecflowUI/src/PlainTextWidget.cpp 0.00% 2 Missing ⚠️
... and 6 more
Additional details and impacted files
@@               Coverage Diff                @@
##             hotfix/5.13.4     #114   +/-   ##
================================================
  Coverage                 ?   47.07%           
================================================
  Files                    ?     1179           
  Lines                    ?    93309           
  Branches                 ?    14744           
================================================
  Hits                     ?    43928           
  Misses                   ?    49381           
  Partials                 ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This is achieved by storing the Expression's AST in a managed
pointer (i.e. std::unique_ptr)

Re ECFLOW-1969
This effectively replaces the use of a raw pointer with a managed
pointer (i.e. std::unique_ptr)

Re ECFLOW-1969
This is achieved by creating a statically allocated cache object that
manages the definitions, and automatically releases them when closing
the application.

Re ECFLOW-1969
This prevents a use after deletion, since clearInternal() calls VReply::resets().

Re ECFLOW-1969
This guarantees source code onsistency as copy/move ctors are also deleted.

Re ECFLOW-1969
@marcosbento marcosbento merged commit 719fdc0 into hotfix/5.13.4 Sep 3, 2024
93 checks passed
@marcosbento marcosbento deleted the hotfix/memory_fixes branch September 3, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants