From: Jon Emil Jahren <>

Using the greedy star matching, arguments like "...%"PRIx64 caused issues
for functions with multiple PRI formats.

The issue was only seen with the ust backend, as it is the only one
using the format regex.

The result for many functions was that the arguments coming after the
greedy star end was left out of the tracepoint, and in some cases some
of the arguments that was traced had the wrong format.

Signed-off-by: Jon Emil Jahren <>
Signed-off-by: Stefan Hajnoczi <>
 scripts/tracetool/ | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/tracetool/ b/scripts/tracetool/
index 1a9733da9a..3646c2b9fc 100644
--- a/scripts/tracetool/
+++ b/scripts/tracetool/
@@ -261,8 +261,9 @@ class Event(object):
-    _FMT = re.compile("(%[\d\.]*\w+|%.*PRI\S+)")
+    # Star matching on PRI is dangerous as one might have multiple
+    # arguments with that format, hence the non-greedy version of it.
+    _FMT = re.compile("(%[\d\.]*\w+|%.*?PRI\S+)")
     def formats(self):
         """List conversion specifiers in the argument print format string."""

Reply via email to