|
From: <Joh...@al...> - 2003-05-09 11:19:42
|
Is there any documentation on the usage of suppressions, ie: adding your
own? The manual just skips over it, and the example docs in the provided
suppression files are cryptic to say the least. Google turned up
nothing. I got the old write(buf) one to work, but others seem to be
just ignored.
Typical things which would be nice to know:
Memcheck vs Addrcheck:
Is Memcheck simply a leak check, and Addrcheck an address validation
function? Can you suppression uninitialised variables with either of these?
What does supp_kind mean, ie: Param vs Free vs Cond
What is the qualification for these, ie: using of the optional pars?
are the fun: / obj: sequential, ie:
fun:_dl_relocate_object*
obj:*libc-2.2.?.so
fun:_dl_catch_error*
Does that mean its _dl_relocate_object, which is called by anything in
libc-2.2 and then called by _dl_catch_error.
Oh yeah, is the order from bottom to top, ie: is the last function
first, rather than other way around (I know its the former, but its nice
to get it stated in documentation...)
Whats core: mean?
{
pthread_error/__pthread_mutex_destroy/_IO_default_finish
core:PThread
fun:pthread_error
fun:__pthread_mutex_destroy
fun:_IO_default_finish*
}
The qualifiers, sometimes we get Memcheck:Value4? Addr4? An explanation
would be nice.
Any pointers to information such as this would be great.
Great project though.
Thanks
John
|
|
From: Nicholas N. <nj...@ca...> - 2003-05-09 12:15:28
|
On Fri, 9 May 2003 Joh...@al... wrote:
> Is there any documentation on the usage of suppressions, ie: adding your
> own? The manual just skips over it, and the example docs in the provided
> suppression files are cryptic to say the least. Google turned up
> nothing. I got the old write(buf) one to work, but others seem to be
> just ignored.
The manual is weak on suppressions. One important thing: C++ function
names must be _mangled_; use --demangle=no to get mangled names in error
messages.
Or, to make life much easier, check out the CVS HEAD from the
Valgrind SourceForge page, build it (see README for instructions), and use
the --gen-suppressions option to automatically generate suppressions for
you. This will answer many of your questions, or remove the need for
answers.
> Is Memcheck simply a leak check, and Addrcheck an address validation
> function? Can you suppression uninitialised variables with either of these?
Memcheck checks the validity (definedness) and addressibility of all
memory reads. Addrcheck only does addressibility checking. Both do leak
checking (with --leak-check=yes). Only Memcheck gives errors for
uninitialised variables, and yes you can suppress them.
> What does supp_kind mean, ie: Param vs Free vs Cond
Means "what kind of error is it"?
> are the fun: / obj: sequential, ie:
>
> fun:_dl_relocate_object*
> obj:*libc-2.2.?.so
> fun:_dl_catch_error*
>
> Does that mean its _dl_relocate_object, which is called by anything in
> libc-2.2 and then called by _dl_catch_error.
Yes, except the '*' is a wildcard. The lines reflect the stack trace in
the error.
> Oh yeah, is the order from bottom to top, ie: is the last function
> first, rather than other way around (I know its the former, but its nice
> to get it stated in documentation...)
First function is the most recently called, ie. the one the error occurred
in.
> Whats core: mean?
The bit before the ':' on the second line indicates what 'skin' (eg.
Memcheck, Addrcheck, etc) the suppression is for; Valgrind's "core" can
detect some errors itself too, in which case you use "core:".
> {
> pthread_error/__pthread_mutex_destroy/_IO_default_finish
> core:PThread
> fun:pthread_error
> fun:__pthread_mutex_destroy
> fun:_IO_default_finish*
> }
>
> The qualifiers, sometimes we get Memcheck:Value4? Addr4? An explanation
> would be nice.
>
> Any pointers to information such as this would be great.
The manual will be improved eventually. Meanwhile, get the CVS HEAD
version and use --gen-suppressions, it will make your life much easier.
N
|