|
From: Morten W. J. <mo...@ne...> - 2005-01-10 11:34:46
|
Hi list.
Checking (with memcheck) my program I have a lot of calls to strlen via the=
=20
same execution path like below there the strlen() is performed on a argumen=
t=20
to the function xml_storage_trim.
=3D=3D13393=3D=3D Conditional jump or move depends on uninitialised value(s)
=3D=3D13393=3D=3D at 0x1B903691: strlen (mac_replace_strmem.c:189)
=3D=3D13393=3D=3D by 0x8048AF8: xml_storage_trim (xmlstorage.c:32)
=3D=3D13393=3D=3D by 0x8048D5B: xml_storage_walk_xpath (xmlstorage.c:113)
=3D=3D13393=3D=3D by 0x804A596: load_structure (xmlstorage.c:526)
This happens a couple of hundred times so I would like to supress the warni=
ng.=20
However I have some trouble writing a proper supresion rule, so I hope=20
somebody can help me out.
My effords so far have resulted in the following.
{
strlen
Memcheck:Cond
fun:xml_storage_trim
fun:xml_walk_xpath
}
which doesn't help me much.
Regards,
Morten W. J=F8rgensen
|
|
From: Tom H. <th...@cy...> - 2005-01-10 11:57:17
|
In message <200...@ne...>
Morten W. J. <mo...@ne...> wrote:
> Checking (with memcheck) my program I have a lot of calls to strlen via the
> same execution path like below there the strlen() is performed on a argument
> to the function xml_storage_trim.
>
> ==13393== Conditional jump or move depends on uninitialised value(s)
> ==13393== at 0x1B903691: strlen (mac_replace_strmem.c:189)
> ==13393== by 0x8048AF8: xml_storage_trim (xmlstorage.c:32)
> ==13393== by 0x8048D5B: xml_storage_walk_xpath (xmlstorage.c:113)
> ==13393== by 0x804A596: load_structure (xmlstorage.c:526)
>
> This happens a couple of hundred times so I would like to supress the warning.
> However I have some trouble writing a proper supresion rule, so I hope
> somebody can help me out.
>
> My effords so far have resulted in the following.
>
> {
> strlen
> Memcheck:Cond
> fun:xml_storage_trim
> fun:xml_walk_xpath
> }
>
> which doesn't help me much.
You've missed out strlen from the functions to match, so that rule
will never match. You also got one of the other names wrong. What you
want is:
{
strlen
Memcheck:Cond
fun:strlen
fun:xml_storage_trim
fun:xml_storage_walk_xpath
}
The other option of course is to fix the problem in your program ;-)
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Morten W. J. <mo...@ne...> - 2005-01-10 12:16:46
|
Now, would you believe that!!!
> {
> strlen
> Memcheck:Cond
> fun:strlen
> fun:xml_storage_trim
> fun:xml_storage_walk_xpath
> }
My suppression now works the way i want.
> The other option of course is to fix the problem in your program ;-)
That is of cause an option, but it is more fun to learn Valgrind than fixin=
g=20
segmentation faults. :-D
I think we'll call them "features" instead of "faults".
Thank for your quick reply.
Regards,
Morten W. J=F8rgensen
|