Repository navigation
Fix some memory issues pointed out by sanitizer - #271
Conversation
Codecov Report
@@ Coverage Diff @@
## master #271 +/- ##
===========================================
- Coverage 51.86% 35.32% -16.53%
===========================================
Files 101 97 -4
Lines 6565 6246 -319
===========================================
- Hits 3404 2206 -1198
- Misses 3161 4040 +879
Continue to review full report at Codecov.
|
rhaschke
left a comment
There was a problem hiding this comment.
I approve the 1st and 3rd commits but don't understand why the 2nd one is necessary and why only for CurrentStage? Can you explain?
But because ClassLoader intrinsically leaks memory (I gave the link in the commit) it makes sense to split all code that registers ClassLoader factories from all other functional library code to get clean memory management reports for the unrelated parts. |
to work around ros/class_loader#131 and have all code using the `CurrentState` stage sanitize correctly (unless they use it through ClassLoader).
|
Thanks for the explanation. You are right, I wanted to enable GUI-based assembly of tasks in the past... Actually, I don't like this workaround very much but suggest using a suppression file instead. There is an explicit reminder that suppressions were used so that the issue isn't silently hidden. But there is another issue: As I merged #254 after having merged the (originally successful) asan checks, the build fails now, because A possible workaround is to |
I was wondering why that did not come up, yes.
This is not a workaround at all in my opinion but simple cleanup. Using/linking a regular C++ class should not invoke magic code to add entries to unused(!) global datastructures that even leak memory. I was surprised to find that you added the macro in the regular cpp file of the class. Incidentally I just followed a suggestion in a potential warning of class loader. I've never seen the warning, but it looks like there can(could?) actually be issues if you link a library with class-loadable datastructures. It would still be nice to suppress the same warnings in the new library if we ever write tests for it.
Yes, I've noticed similar issues locally (same with RViz and the MTC display/panel, though these are not relevant for CI tests). |
Are you still planning to do so.? I'm asking because one thing I've been working on during the last few lockdowns is to create a similar application, this's the current status mtc_gui.mp4As you can see it's not ready yet, but I do still slowly work on it when I have free time, I wonder if you have an architect document that may help me during the development |
|
@JafarAbdi: See #278. |
Related to #268