Fix: incorrect parameters passed to vtracelog
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 16 Dec 2020 21:23:53 +0000 (16:23 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 16 Dec 2020 21:23:53 +0000 (16:23 -0500)
commit49faeca7301c4081d16ef360636bc79077c9943f
treeaf3a2914864d0564b658b6f72fbe6c694fad0e24
parentabbb25fd2b9d5bea6ec4d76e5df4a2b7259ece04
Fix: incorrect parameters passed to vtracelog

The vtracelog APIs should be called from the vtracelog instrumentation
rather than the "tracelog" APIs, because it passes a va_list rather than
a variable argument list (...).

This can be verified by tracing the demo program doc/examples/demo-tracelog/demo-vtracelog:

Issue (corrupted trace output):

16:17:26.686073539] (+0.000000530) thinkos lttng_ust_tracelog:TRACE_ERR: { cpu_id = 2 }, { line = 31, file = "demo-vtracelog.c", func = "print_err", _msg_length = 49, msg = "This is a \"\b\" formatted 638975520 error event d68" }

Fixed:

[16:23:33.538189343] (+0.000000600) thinkos lttng_ust_tracelog:TRACE_ERR: { cpu_id = 3 }, { line = 31, file = "demo-vtracelog.c", func = "print_err", _msg_length = 52, msg = "This is a \"mystring test\" formatted 4 error event 42" }

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I330e339a3bf68fb8d9779bbc71b08c3bc033ac4e
include/lttng/tracelog.h
This page took 0.024847 seconds and 5 git commands to generate.