[RTEMS Project] #3192: RTL Memory Leak after module unload with dlclose()
RTEMS trac
trac at rtems.org
Sat Oct 14 18:05:26 UTC 2017
#3192: RTL Memory Leak after module unload with dlclose()
--------------------------+-------------------------
Reporter: Kevin Gordon | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone: 4.11.3
Component: lib/dl | Version: 4.11
Severity: major | Keywords: RTL dlclose
--------------------------+-------------------------
RTL produces a memory leak of varying size, depending upon a loaded
module's code size or other unknown factors, after unloading a module
using the dlclose() function.
Architecture is sparc-leon3 using both the RTEMS 4.11.1 public release and
rtems master @f043b9bd3bf25626fb1a311dd7fa041eacc68adc with rtems-source-
builder @55f2d69e9b67cde23d61375fa34ef5b0f04a985d.
This bug can be demonstrated by compiling the
rtems/testsuites/samples/paranoia/paranoia.c source file into an ELF .o
file, and then continually loading and unloading the paranoia.o file using
dlopen() and dlclose(). Calls to malloc_info() after each dlopen() will
demonstrate that the heap free bytes is reduced over each call when a
dlclose() is made in-between. If enough calls are made to dlopen() and
dlclose(), the system will run of of heap entirely as reported by RTL: "no
memory for obj global syms"
Using RTEMS 4.11.1, this test case demonstrates a leak of 1512 bytes for
each dlclose() and a leak of 1424 bytes using rtems master at the above
hash.
In addition, this memory leak is reproducible using the Gaisler custom
rtems 4.12 tools and their UT700 BSP with the same results as rtems master
at above hash, with a demonstrated leak of 1424 bytes per each module
unload of paranoia.o.
--
Ticket URL: <http://devel.rtems.org/ticket/3192>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list