lkml.org 
[lkml]   [2012]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] [perf] convert_variable_type does not correctly check type of arrays
Date
Hi Hannes,

On Mon, 5 Nov 2012 23:49:16 +0100, Hannes Frederic Sowa wrote:
> While casting an array of (unsigned) chars to a string, perf does not
> check the containing type but only the opaque type and is bailing out:
>
> $ perf probe -v -a 'neigh_destroy:22 dev->name:string'
> probe-definition(0): neigh_destroy:22 dev->name:string
> symbol:neigh_destroy file:(null) line:22 offset:0 return:0 lazy:(null)
> parsing arg: dev->name:string into type:string dev, name(1)
> 1 arguments
> Use vmlinux: /home/hannes/linux/vmlinux
> Using /home/hannes/linux/vmlinux for symbols
> Probe point found: neigh_destroy+115
> Searching 'dev' variable in context.
> Converting variable dev into trace event.
> converting name in dev
> name type is (null).
> Failed to cast into string: name is not (unsigned) char *.
> Failed to find 'dev' in this function.
> An error occurred in debuginfo analysis (-22).
> Error: Failed to add events. (-22)
>
> After the code flow ensures that type could only be a pointer or
> array type, call die_get_real_type unconditionally again to fetch the
> containing type and have further validation been done on that Die.

Hyeoncheol posted a same fix before, but not merged yet, Arnaldo?

https://lkml.org/lkml/2012/9/20/3

Thanks,
Namhyung



\
 
 \ /
  Last update: 2012-11-07 09:21    [W:0.042 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site