Skip to content

Commit

Permalink
valgrind: suppress libuuid TLS leak
Browse files Browse the repository at this point in the history
Problem: valgrind test fails after modifying linkage arguments
for macos portability.

  ==1220291== 704 bytes in 1 blocks are possibly lost in loss record 6 of 13
  ==1220291==    at 0x4C39185: malloc (vg_replace_malloc.c:442)
  ==1220291==    by 0x40155B0: UnknownInlinedFun (rtld-malloc.h:56)
  ==1220291==    by 0x40155B0: _dl_resize_dtv (dl-tls.c:494)
  ==1220291==    by 0x40160F1: _dl_update_slotinfo (dl-tls.c:810)
  ==1220291==    by 0x40161FB: update_get_addr (dl-tls.c:917)
  ==1220291==    by 0x4001E9B: __tls_get_addr (tls_get_addr.S:55)
  ==1220291==    by 0x57D6418: ??? (in /usr/lib64/libuuid.so.1.3.0)
  ==1220291==    by 0x57D6608: ??? (in /usr/lib64/libuuid.so.1.3.0)
  ==1220291==    by 0x57D5B48: __uuid_generate_random (in /usr/lib64/libuuid.so.1.3.0)
  ==1220291==    by 0x57D5BE9: uuid_generate_random (in /usr/lib64/libuuid.so.1.3.0)
  ==1220291==    by 0x410157: module_create (module.c:379)
  ==1220291==    by 0x410F97: modhash_load (modhash.c:284)
  ==1220291==    by 0x4112D6: load_cb (modhash.c:347)
  ==1220291==    by 0x4E6F819: call_handler (msg_handler.c:339)
  ==1220291==    by 0x4E6FDFA: dispatch_message (msg_handler.c:375)
  ==1220291==    by 0x4E6FDFA: handle_cb (msg_handler.c:476)
  ==1220291==    by 0x4EA0F92: ev_invoke_pending (ev.c:3776)
  ==1220291==    by 0x4EA4E87: ev_run (ev.c:4196)
  ==1220291==    by 0x4EA4E87: ev_run (ev.c:4027)
  ==1220291==    by 0x4E6EB3A: flux_reactor_run (reactor.c:97)
  ==1220291==    by 0x40D3ED: main (broker.c:532)
  ==1220291==

It looks like libuuid is allocating memory in thread-local storage,
though it is unclear why we didn't see this before.

Suppress this error.
  • Loading branch information
garlick committed Dec 5, 2024
1 parent 2e9bcea commit 4a17c06
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions t/valgrind/valgrind.supp
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,12 @@
fun:hwloc_topology_load
...
}
{
<libuuid_tls_leak>
Memcheck:Leak
match-leak-kinds: possible
fun:malloc
...
fun:uuid_generate*
...
}

0 comments on commit 4a17c06

Please sign in to comment.