All of lore.kernel.org
 help / color / mirror / Atom feed
* Libxenstore memory leak on static compile
@ 2012-09-12 13:44 Andres Lagar-Cavilla
  2012-09-12 14:56 ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Andres Lagar-Cavilla @ 2012-09-12 13:44 UTC (permalink / raw)
  To: xen-devel, Ian Campbell, Ian Jackson

When statically compiling libxenstore.a, the USE_PTHREAD define is not applied. This results in cleanup_{pus/pop} being no-ops. cleanup_p* are used throughout xs.c:read_message to free malloc'ed objects.

In short, libxenstore.a will leak memory when reading xenstore messages. OOM killer awaits.

This could be solved by either turning on USE_PTHREAD for .a compilation (which, N.B. will not actually link libpthread but instead produce an object archive that needs to be eventually linked to libpthread.so), or by replacing cleanup_p* by proper free calls.

Thoughts?
Andres

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-13 14:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12 13:44 Libxenstore memory leak on static compile Andres Lagar-Cavilla
2012-09-12 14:56 ` Ian Campbell
2012-09-12 15:03   ` Roger Pau Monne
2012-09-12 15:09     ` Andres Lagar-Cavilla
2012-09-12 15:56       ` Ian Campbell
2012-09-13 14:33         ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.