Project

General

Profile

Actions

Bug #380

closed

babeltrace SIGSEGV on freeing ipath

Added by Damien COTTIER over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
10/18/2012
Due date:
% Done:

100%

Estimated time:

Description

Hi,

within one of the last commit 9fe26ec7307661efcc268a58293564fdb55e5572 you have modified the way popt strings are deallocated

while executing

/work1/dcottier/tools/trace/x86_64/bin/babeltrace /work1/dcottier/tools/trace/x86_64/Tests/lttng-traces/test1-trace-20121018-105458/
[10:54:58.588911817] (+?.?????????) ino.lin.mbt.kalray.eu:test1-trace:8163 test1:tp1: { cpu_id = 2 }, { value1 = 256 }
[10:54:58.588916254] (+0.000004437) ino.lin.mbt.kalray.eu:test1-trace:8163 test1:tp2: { cpu_id = 2 }, { value1 = 65536, value2 = 0x101 }
[10:54:58.588917783] (+0.000001529) ino.lin.mbt.kalray.eu:test1-trace:8163 test1:tp3: { cpu_id = 2 }, { value1 = 16777216, value2 = 0x10001, value3 = 0x102 }
[10:54:58.588919622] (+0.000001839) ino.lin.mbt.kalray.eu:test1-trace:8163 test1:tp4: { cpu_id = 2 }, { str = "string for trace test", llvalue = 0x123456789ABCDEF }
Segmentation fault (core dumped)

the SIGSEGV occurs in the free(ipath) converter/babeltrace.c:677

for (i = 0; i < opt_input_paths->len; i++) {
char *ipath = g_ptr_array_index(opt_input_paths, i);
free(ipath);
}

This is probably due to the difference how the libpop is working. I'm using fedora16 with the following popt package:

sudo yum info popt
Loaded plugins: langpacks, presto, refresh-packagekit
virtualbox | 951 B 00:00
Installed Packages
Name : popt
Arch : i686
Version : 1.13
Release : 9.fc16
Size : 80 k
Repo : installed
From repo : Mercure-f16-x86_64-everything
Summary : C library for parsing command line parameters
URL : http://www.rpm5.org/
License : MIT
Description : Popt is a C library for parsing command line parameters. Popt was
: heavily influenced by the getopt() and getopt_long() functions, but
: it improves on them by allowing more powerful argument expansion.
: Popt can parse arbitrary argv[] style arrays and automatically set
: variables based on command line arguments. Popt allows command line
: arguments to be aliased via configuration files and includes utility
: functions for parsing arbitrary strings into argv[] arrays using
: shell-like rules.

Name : popt
Arch : x86_64
Version : 1.13
Release : 9.fc16
Size : 82 k
Repo : installed
From repo : f16-x86_64-everything
Summary : C library for parsing command line parameters
URL : http://www.rpm5.org/
License : MIT
Description : Popt is a C library for parsing command line parameters. Popt was
: heavily influenced by the getopt() and getopt_long() functions, but
: it improves on them by allowing more powerful argument expansion.
: Popt can parse arbitrary argv[] style arrays and automatically set
: variables based on command line arguments. Popt allows command line
: arguments to be aliased via configuration files and includes utility
: functions for parsing arbitrary strings into argv[] arrays using
: shell-like rules.

Rgds

Actions #1

Updated by Mathieu Desnoyers over 11 years ago

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

Also available in: Atom PDF