Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: hannes.weisbach@mailbox.tu-dresden.de (Hannes Weisbach)
Subject: [lttng-dev] [BUG] lttng-sessiond
Date: Sat, 25 Apr 2015 16:37:17 +0200	[thread overview]
Message-ID: <9E6E6DE2-E219-4F79-9687-BE7A45910C34@mailbox.tu-dresden.de> (raw)
In-Reply-To: <480136718.35882.1429900335415.JavaMail.zimbra@efficios.com>

> 
> Why do you need to load those explicitly ? They should be
> already loaded by default. I don't get those errors here.
> Which shell are you using (sh symlink) ? Can you reproduce
> using bash ?
Ok.  Found the bug.  In append_list_to_probes() index is used to get
the current index into the probes array.  However in the loop, index
is never incremented.  Therefore, the first entry of probes is
overwritten, but nr_probes is incremented, and later those "empty"
entries are referenced.

There is also a memory leak in append_list_to_probes():
 
tmp_list = strdup(list); // uses malloc()
next = strtok(tmp_list, ","); // tmp_list needs to be NULL except in the first iteration
tmp_list = NULL; // so set it NULL
free(tmp_list); // good intention, does not work.

Best regards,
Hannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20150425/3a0dfd04/attachment.sig>


  parent reply	other threads:[~2015-04-25 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 10:04 Hannes Weisbach
2015-04-23 19:26 ` Mathieu Desnoyers
2015-04-23 20:13   ` Mathieu Desnoyers
2015-04-24  9:52     ` Hannes Weisbach
2015-04-24 18:32       ` Mathieu Desnoyers
2015-04-25 14:13         ` Hannes Weisbach
2015-04-25 14:37         ` Hannes Weisbach [this message]
2015-04-25 15:37           ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9E6E6DE2-E219-4F79-9687-BE7A45910C34@mailbox.tu-dresden.de \
    --to=hannes.weisbach@mailbox.tu-dresden.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox