Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] lttng-tools-2.0.0: lttng segmentation fault bug
Date: Tue, 3 Apr 2012 10:05:33 -0400	[thread overview]
Message-ID: <20120403140533.GA17161@Krystal> (raw)
In-Reply-To: <OF6C462BE1.E536A419-ON852579D5.004C0DEB-852579D5.004D1935@jci.com>

* Ryan.Kyser at jci.com (Ryan.Kyser at jci.com) wrote:
>    I have found a bug in lttng-tools-2.0.0/src/bin/lttng/lttng.c
> 
>    I cross compiled this for one of our embedded linux platforms, but I get a
>    segmentation fault when running it. I have determined that this is due to
>    the getenv() function call in line 527 (see excerpt below). It assumes
>    that the environment variable USER is present. In my system this variable
>    is not present, and so getenv() was returning NULL.
> 
>    //----------------------------------------------------
>    //        Excerpt from lttng.c
>    //----------------------------------------------------
>    519 int main(int argc, char *argv[])
>    520 {
>    521         int ret;
>    522
>    523         progname = argv[0] ? argv[0] : "lttng";
>    524
>    525         /* For Mathieu Desnoyers a.k.a. Dr. Tracing */
>    526         if (strncmp(progname, "drtrace", 7) == 0 ||
>    527                         strncmp("compudj", getenv("USER"), 7) == 0) {
>    528                 MSG("%c[%d;%dmWelcome back Dr Tracing!%c[%dm\n",
>    27,1,33,27,0);
>    529         }

I have to admit that finding a bug in David's easter egg is hilarious.
:-)

Thanks for reporting it!

Mathieu

> 
>    Thank you,
>    Ryan Kyser

> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



  reply	other threads:[~2012-04-03 14:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 14:02 Ryan.Kyser
2012-04-03 14:05 ` Mathieu Desnoyers [this message]
2012-04-03 15:05   ` David Goulet

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=20120403140533.GA17161@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    /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