Project

General

Profile

Actions

Bug #271

closed

Segmentation fault for lttng create if environment variable HOME is not set

Added by Bernd Hufmann almost 13 years ago. Updated almost 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
06/19/2012
Due date:
% Done:

100%

Estimated time:

Description

In the (unlikely) case that the shell environment variable HOME is not set, a segmentation fault is created when executing the command lttng create <session name>.

I used lttng-tools version v2.0.4

Here is the information I got from the core dump:

Core was generated by `lttng create mySession'.
Program terminated with signal 11, Segmentation fault.
#0 0xb76907f1 in ?? () from /lib/libc.so.6
(gdb) backtrace
#0 0xb76907f1 in ?? () from /lib/libc.so.6
#1 0xb7690465 in strdup () from /lib/libc.so.6
#2 0x0804b98d in create_session (argc=2, argv=0xbfbbd318) at commands/create.c:97
#3 cmd_create (argc=2, argv=0xbfbbd318) at commands/create.c:193
#4 0x0805151e in handle_command (argc=3, argv=0xbfbbd314) at lttng.c:265
#5 parse_args (argc=3, argv=0xbfbbd314) at lttng.c:483
#6 main (argc=3, argv=0xbfbbd314) at lttng.c:539

In this case method call getenv("HOME") returns 0 and the sub-sequent call of strdup() causes the segmentation fault.

Best Regards
Bernd

Actions #1

Updated by David Goulet almost 13 years ago

  • Status changed from New to Confirmed
  • Assignee set to David Goulet
Actions #2

Updated by David Goulet almost 13 years ago

  • Status changed from Confirmed to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF