-
Notifications
You must be signed in to change notification settings - Fork 30
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 the finite element dual assignment operators #1032
Conversation
Co-authored-by: Jamie A. Bramwell <bramwell1@llnl.gov> Co-authored-by: Tom Epperly <epperly2@llnl.gov>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #1032 +/- ##
===========================================
- Coverage 88.95% 88.88% -0.08%
===========================================
Files 153 153
Lines 12325 12344 +19
===========================================
+ Hits 10964 10972 +8
- Misses 1361 1372 +11 ☔ View full report in Codecov by Sentry. |
@tepperly , I added a few extras to your patch. Let me know if this works for you. |
out of curiosity, what was the cause of the underlying leak? |
I defer to @tepperly as he developed and tested this patch. |
I believe it's the operator=(&& rhs) variant. After an invocation of the move operator, the compiler assumes that the rhs has been completely pilfered (i.e., all of the allocated resources owned by rhs have been moved into this or freed). When rhs is an upcast, it doesn't properly deal with all the parts of rhs leaving some orphaned pointers. This is what my valgrind logs suggested at least. Applying this patch, plugged some leaks. In particular, I believe it was when the right hand side was an instead of |
The comments saying this seems like the wrong way to be doing this assignment drew my attention. |
…memory_leak Conflicts: src/serac/physics/solid_mechanics.hpp
It would be nice if this could get in soon, so LiDO's next TPL could have it. Without this patch, my uncertain bracket problem crashes in 10-20 MMA iterations do to the Linux OOM killler which sometimes crashes my desktop. |
This fixes a memory leak as reported by @tepperly .