[lttng-dev] lttng-tools-2.0.0: lttng segmentation fault bug

David Goulet dgoulet at efficios.com
Tue Apr 3 11:05:41 EDT 2012


-----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-----



More information about the lttng-dev mailing list