From: dgoulet@efficios.com (David Goulet)
Subject: [lttng-dev] lttng-tools-2.0.0: lttng segmentation fault bug
Date: Tue, 03 Apr 2012 11:05:41 -0400 [thread overview]
Message-ID: <4F7B11C5.9090907@efficios.com> (raw)
In-Reply-To: <20120403140533.GA17161@Krystal>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12-04-03 10:05 AM, Mathieu Desnoyers wrote:
> * 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.
> :-)
Right... this is somehow embarrassing... failing an easter egg...
This has been fixed (hopefully for you) with commit
cbbb813a7c2d17a7df2c107f807d1826d45a34fc
We will surely be releasing 2.0.1 soon which will include this fix.
Thanks for the report!
David
>
> 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
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQEcBAEBAgAGBQJPexHAAAoJEELoaioR9I02d1kH/1up7JaZpW/ge+/RT0vtR6hg
3I8wzMxg1BohYMcIhzDpVNiDSee2OGnbsHXIwDX1QExh3q6dLV26NjKeLZ3ZbjGV
AQ8Wr1GjOKJmQz8bM6Bo/5OLE8vvPiexbImw2m4h0ukKdaTzE0twdhgIyKGLjIvp
8VMPZhOi+9JazHPJVu5XA57AhJy1L61tftC4owhHDFFwN4gCDnyZX+bsH5vVqH+v
do4eWieBm8Bkqg5l64SMFwBfyPoM4gI3aqcqy8YJj4s19si392W97KkosHNcn5sv
6h5NkmAKlSI2E95JlPh88mkmEj3ANB7TdvMUJ0h+j6nMGNpXt8U/c77Tdh9dC4w=
=iXWN
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2012-04-03 15: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
2012-04-03 15:05 ` David Goulet [this message]
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=4F7B11C5.9090907@efficios.com \
--to=dgoulet@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