From 394ff38e77d4510a4ff806eb187bf739e84561c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 7 Mar 2016 22:35:23 -0500 Subject: [PATCH] lttng enable-channel memsets lttng_channel to -1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The lttng enable-channel command uses a global struct lttng_channel which it initializes to contain all "-1". This is a hack used to set tag all attributes as "unset" which has the unfortunate consequence of setting the extended pointer to a non-sensical value. This workaround explicitly sets the extended pointer to NULL, but this command should be refactored so it is no longer necessary. Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/enable_channels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index 673fecfc5..696b8e094 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -380,6 +380,7 @@ static void init_channel_config(void) * those needed to be set by the default values. */ memset(&chan.attr, -1, sizeof(chan.attr)); + chan.attr.extended.ptr = NULL; } /* -- 2.34.1