Actions
Bug #420
closedMemory leak triggered from lttng_create_session
Start date:
01/08/2013
Due date:
% Done:
100%
Estimated time:
Description
Bug was verified on:
2c452d4 (HEAD, origin/master, origin/HEAD) Add pkg-config for liblttng-ctl
Valgrind is reporting a memory leak:
==25924== 8,212 bytes in 1 blocks are definitely lost in loss record 483 of 486 ==25924== at 0x4C26B03: calloc (vg_replace_malloc.c:593) ==25924== by 0x4E3A868: uri_parse (uri.c:269) ==25924== by 0x4E35D2D: parse_str_urls_to_uri (lttng-ctl.c:129) ==25924== by 0x4E362C5: lttng_create_session (lttng-ctl.c:1156) ==25924== by 0x4227EB: Our_code() ==25924== ==25924== 8,212 bytes in 1 blocks are definitely lost in loss record 484 of 486 ==25924== at 0x4C26B03: calloc (vg_replace_malloc.c:593) ==25924== by 0x4E35E63: parse_str_urls_to_uri (lttng-ctl.c:177) ==25924== by 0x4E362C5: lttng_create_session (lttng-ctl.c:1156) ==25924== by 0x4227EB: Our code()
Our code does:
char buf[256] = "/tmp/path"; lttng_create_session(session, bufP)) < 0); dom.type = LTTNG_DOMAIN_UST; lttng_create_handle(sessionRDname.c_str(), &dom); strncpy(chan.name, channel, NAME_MAX); chan.name[NAME_MAX - 1] = '\0'; lttng_channel_set_default_attr(&dom, &chan.attr); lttng_enable_channel(handle, &chan); for (our list) { lttng_enable_event_with_filter(handle, &event, channel, filter_expr); } lttng_destroy_handle(handle); lttng_destroy_session(sessionRDname.c_str());
There is error checking around all the functions. None of the calls fail.
The leak is 100% reproducible. The library is compiled with optimizations, but that shouldn't affect anything other than the call trace.
Actions