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 }
Thank you,
Ryan Kyser
_______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
