lp:~lttng/babeltrace/trunk

Created by Ubuntu LTTng on 2011-05-21 and last modified on 2019-08-25
Get this branch:
bzr branch lp:~lttng/babeltrace/trunk

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Ubuntu LTTng
Project:
Babeltrace
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://git.efficios.com/babeltrace.git.

The next import is scheduled to run in 2 hours.

Last successful import was 3 hours ago.

Import started 3 hours ago on alnitak and finished 3 hours ago taking 20 seconds — see the log
Import started 9 hours ago on alnitak and finished 9 hours ago taking 20 seconds — see the log
Import started 15 hours ago on alnitak and finished 15 hours ago taking 20 seconds — see the log
Import started 22 hours ago on alnitak and finished 22 hours ago taking 20 seconds — see the log
Import started on 2019-08-24 on alnitak and finished on 2019-08-24 taking 20 seconds — see the log
Import started on 2019-08-24 on alnitak and finished on 2019-08-24 taking 20 seconds — see the log
Import started on 2019-08-23 on alnitak and finished on 2019-08-23 taking 20 seconds — see the log
Import started on 2019-08-23 on alnitak and finished on 2019-08-23 taking 20 seconds — see the log
Import started on 2019-08-23 on alnitak and finished on 2019-08-23 taking 20 seconds — see the log
Import started on 2019-08-22 on alnitak and finished on 2019-08-22 taking 20 seconds — see the log

Recent revisions

3653. By Simon Marchi <email address hidden> 8 hours ago

Fix: ctf: fix possible use-after-free in ctf_fs_component_create

The error path destroys the ctf_fs_component, but doesn't reset the
variable, so we return a pointer to free'd memory. We should be
returning NULL in the error case. Fix it by assigning to NULL after
destroying the ctf_fs_component.

Change-Id: Ib7afd03009dc646460f77fae331920307229220a
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1973
Tested-by: jenkins <email address hidden>
Reviewed-by: Francis Deslauriers <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

3652. By .eepp 8 hours ago

Fix: cli: replace remaining log level `V` (verbose) -> `T` (trace)

Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I0649be8f1121ee145163c026847f1117d965b728
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1958
Tested-by: jenkins <email address hidden>

3651. By Francis Deslauriers <email address hidden> 8 hours ago

Fix: sink.ctf.fs: dereference before NULL check

  CID 1404550 (#1 of 1): Dereference before null check (REVERSE_INULL)
  check_after_deref: Null-checking tsdl suggests that it may be null,
  but it has already been dereferenced on all paths leading to the
  check.

Reported-by: Coverity - Dereference before null check (REVERSE_INULL)
Signed-off-by: Francis Deslauriers <email address hidden>
Change-Id: I7566cbd74529e93587079d163bb1691e420f723f
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1974
Tested-by: jenkins <email address hidden>
Reviewed-by: Simon Marchi <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

3650. By Francis Deslauriers <email address hidden> on 2019-08-23

Fix: autodisc: possible use-after-free

Reported-by: scan-build: Memory error Use-after-free
Signed-off-by: Francis Deslauriers <email address hidden>
Change-Id: Icfb8a6640a096369d51ba1c04ce43d043af7af59
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1971
Tested-by: jenkins <email address hidden>
Reviewed-by: Simon Marchi <email address hidden>
Reviewed-by: Jérémie Galarneau <email address hidden>

3649. By Francis Deslauriers <email address hidden> on 2019-08-23

Fix: sink.utils.counter: possible NULL pointer dereference

If the null check at line 148 is true, the `counter` pointer might be
used will be used while being NULL by the
`destroy_private_counter_data()` function.

scan-build report:
  Access to field 'msg_iter' results in a dereference of a null pointer
  (loaded from variable 'counter')

Reported-by: scan-build - Logic error Dereference of null pointer
Signed-off-by: Francis Deslauriers <email address hidden>
Change-Id: I50bb981433ef3f5083613b36bbef54743cddb4c2
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1970
Tested-by: jenkins <email address hidden>
Reviewed-by: Jérémie Galarneau <email address hidden>
Reviewed-by: Simon Marchi <email address hidden>

3648. By Francis Deslauriers <email address hidden> on 2019-08-23

sink.ctf.fs: cleanup: duplicated `:` in log statements

Signed-off-by: Francis Deslauriers <email address hidden>
Change-Id: Id0cc8d4ee400e3615e4a3e231c56c5d7315f7605
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1969
Tested-by: jenkins <email address hidden>
Reviewed-by: Jérémie Galarneau <email address hidden>
Reviewed-by: Simon Marchi <email address hidden>

3647. By Francis Deslauriers <email address hidden> on 2019-08-23

Fix: sink.ctf.fs: possible use-after-free

Issue
=====
We might use of `trace` pointer after freeing it in the error path.

Solution
========
Move the `fclose()` call (and surroundings) before the `end` label as
the `fh` pointer is only initialized after the only possible `goto end`.

Reported-by: scan-build - Use of memory after it is freed
Signed-off-by: Francis Deslauriers <email address hidden>
Change-Id: I8f346b45a76ce976019931f9c63c20dd18a88d86
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1968
Tested-by: jenkins <email address hidden>
Reviewed-by: Jérémie Galarneau <email address hidden>
Reviewed-by: Simon Marchi <email address hidden>

3646. By Simon Marchi <email address hidden> on 2019-08-20

lib: make g++ happy with plugin-dev.h macros

g++ doesn't like the syntax used for assigning structures in the plugin
macros:

  /tmp/babeltrace/include/babeltrace2/plugin/plugin-dev.h:599:3: error: expected primary-expression before ‘.’ token
     .value._attr_name = _x, \
     ^
  /tmp/babeltrace/include/babeltrace2/plugin/plugin-dev.h:871:2: note: in expansion of macro ‘__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE’
    __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD, _id, _comp_class_id, source, _x)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /tmp/babeltrace/include/babeltrace2/plugin/plugin-dev.h:1356:2: note: in expansion of macro ‘BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID’
    BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  can.cpp:829:1: note: in expansion of macro ‘BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD’
   BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(CANSource, can_iter_init);
   ^

Changing

    .value._attr_name = _x

to

    .value = { ._attr_name = _x }

makes it work. There are a few instances of this, I changed all I found.

Built-tested with gcc 7.4.0 and clang-9, and verified that a plugin compiled
with g++ 7.4.0 works.

Change-Id: I17cb4edf1082003dc0bb9d0fae906c391daf3da4
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1964
Reviewed-by: Jérémie Galarneau <email address hidden>
Tested-by: jenkins <email address hidden>

3645. By Simon Marchi <email address hidden> on 2019-08-17

bt2: don't show warning when query method raises a non-error exception

I noticed that when a Python query raised bt2.UnknownObject, we show
this warning:

 W BT2-PY component_class_query@native_bt_component_class.i.h:802 Failed to call Python class's _bt_query_from_native() method: py-cls-addr=0x6190001090a0

In my opinion, a query returning "unknown object" is part of the normal
course of operation, and we should not show a warning. So, only show it
when the exception gets translated to a status < 0. Also, append an
error cause while at it in case of error.

Change-Id: I079f67b74df881ab000c6e223667ca72dcd52713
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1952
CI-Build: Philippe Proulx <email address hidden>
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

3644. By .eepp on 2019-08-17

bt_common_parse_lttng_live_url(): don't accept `net://RDHOST/host/TGTHOST`

This patch makes the bt_common_parse_lttng_live_url() function not
accept LTTng live URLs with the form:

    net[4]://RDHOST[:RDPORT]/host/TGTHOST

This was previously accepted for the session listing feature, but in
fact the `babeltrace` program (Babeltrace 1) only accepts this form:

    net[4]://RDHOST[:RDPORT]

and the list of URLs that the `babeltrace2` program prints with the
first form is invalid.

Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I68a804c69ec557ed9cc77c9020afbbe2f79a7c43
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1961
Tested-by: jenkins <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers