sleyzerzon / soar

Automatically exported from code.google.com/p/soar
1 stars 0 forks source link

EmbeddedConnection valgrind issues #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Description From Bob Marinier 2008-08-24 18:11:26 (-) [reply]
I ran TestCLI with valgrind (just started and quit without doing anything), 
and
valgrind reports several "leaks" in the "still reachable" category and  all
stemming from this line:

hLibrary = dlopen(newLibraryName.c_str(), RTLD_LAZY);

Basically, we never unload the library, and thus we get a bunch of "leaks".  
If
I hack in some code to unload the library (by storing the handle on the 
class
and then dlclose'ing the handle in CloseConnection) then most of the leaks 
go
away. (It goes from 1052 bytes in 6 blocks to 20 bytes in 1 block).

There are other problems with dlopen which do not appear to be our fault.  
For
example, we get the error described here:

https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/114032

...the last comment of which suggests a workaround (although I don't know 
how
to do what it suggests).

My concern here is not to waste time on issues that don't affect anyone, 
but
rather to clean up valgrind's output so we can see any real errors as they 
come
up.  Perhaps we can get buildbot to automatically run valgrind and ignore 
these
errors (so we only get failures on new errors).

Original issue reported on code.google.com by voigtjr@gmail.com on 23 Jul 2009 at 5:04

GoogleCodeExporter commented 9 years ago

Original comment by voigtjr@gmail.com on 23 Jul 2009 at 5:29

GoogleCodeExporter commented 9 years ago

Original comment by voigtjr@gmail.com on 23 Feb 2010 at 7:39

GoogleCodeExporter commented 9 years ago

Original comment by voigtjr@gmail.com on 3 Mar 2010 at 4:08

GoogleCodeExporter commented 9 years ago
I cleaned up a bunch of memory leaks, not going to address these other obscure 
valgrind issues. The valgrind output is really clean now.

Original comment by voigtjr@gmail.com on 18 Mar 2010 at 7:38