|
From: Leonard m. <spa...@ya...> - 2004-11-29 15:05:01
|
I have 8 suppressions to kill warnings caused by valgrind thinking
that a single string returned by the NVidia drivers contains
uninitialized bytes.
1) Is there a way to sanitize a memory buffer so that valgrind will
think it's been initialized?
Most of these warnings are flagged deep within stdio when logging the
string. We also have our own logging wrappers. Consequently 4 callers
per frame are woefully inadequate to suppress these errors without
potentially suppressing many others that shouldn't be suppressed. I
had to change VG_N_SUPP_CALLERS to 12 to get enough frames to precisely
kill just these warnings.
2) Would the developers consider upping VG_N_SUPP_CALLERS to something
like 12 or 16?
The number of frames could be greatly reduced if valgrind supported
a wildcard syntax for matching 0..N frames containing a function call,
similar to what Rational Purify does. E.g.:
# Conditional jump or move depends on uninitialised value(s)
RHH__UMR_NVIDIA_6629__checkOpenGLVersion4
Memcheck:Cond
fun:*
fun:_Z21_checkOpenGLVersionv
3) Does someone have a patch for a wildcard syntax like this?
Thanks.
P.S. Here are the suppressions:
{
# Conditional jump or move depends on uninitialised value(s)
RHH__UMR_NVIDIA_6629__checkOpenGLVersion
Memcheck:Cond
fun:strlen
fun:_IO_vfprintf_internal
fun:_IO_vsprintf_internal
fun:_Z7LogInfovPKcPc
fun:_Z6LogInfoPKcz
fun:_Z21_checkOpenGLVersionv
}
{
# Conditional jump or move depends on uninitialised value(s)
RHH__UMR_NVIDIA_6629__checkOpenGLVersion2
Memcheck:Cond
fun:_IO_str_overflow_internal
fun:_IO_default_xsputn_internal
fun:_IO_vfprintf_internal
fun:_IO_vsprintf_internal
fun:_Z7LogInfovPKcPc
fun:_Z6LogInfoPKcz
fun:_Z21_checkOpenGLVersionv
}
{
# Conditional jump or move depends on uninitialised value(s)
RHH__UMR_NVIDIA_6629__checkOpenGLVersion3
Memcheck:Cond
fun:_IO_default_xsputn_internal
fun:_IO_vfprintf_internal
fun:_IO_vsprintf_internal
fun:_Z7LogInfovPKcPc
fun:_Z6LogInfoPKcz
fun:_Z21_checkOpenGLVersionv
}
{
# Conditional jump or move depends on uninitialised value(s)
RHH__UMR_NVIDIA_6629__checkOpenGLVersion4
Memcheck:Cond
fun:strlen
fun:_IO_vfprintf_internal
fun:buffered_vfprintf
fun:_IO_vfprintf_internal
fun:_IO_fprintf
fun:_Z12errHdlr10Severity
fun:_Z6LogInfoPKcz
fun:_Z21_checkOpenGLVersionv
}
{
# Conditional jump or move depends on uninitialised value(s)
RHH__UMR_NVIDIA_6629__checkOpenGLVersion5
Memcheck:Param
write(buf)
obj:/lib/tls/libc.so.6
fun:new_do_write
fun:_IO_file_xsputn@@GLIBC_2.1
fun:buffered_vfprintf
fun:_IO_vfprintf_internal
fun:_IO_fprintf
fun:_Z12errHdlr10Severity
fun:_Z6LogInfoPKcz
fun:_Z21_checkOpenGLVersionv
}
{
# Conditional jump or move depends on uninitialised value(s)
RHH__UMR_NVIDIA_6629__checkOpenGLVersion6
Memcheck:Cond
fun:_Z21_checkOpenGLVersionv
fun:_Z9_configiii
fun:_Z8configi
fun:_Z24reallyInitialiseRendererb9rnNVGMode
}
{
RHH__UMR_NVIDIA_6629__checkOpenGLVersion7
Memcheck:Cond
fun:strlen
fun:_IO_vfprintf_internal
fun:_IO_fprintf
fun:_Z12errHdlr10Severity
fun:_Z6LogInfoPKcz
fun:_Z21_checkOpenGLVersionv
}
{
RHH__UMR_NVIDIA_6629__checkOpenGLVersion8
Memcheck:Param
write(buf)
obj:/lib/tls/libc.so.6
fun:new_do_write
fun:_IO_do_write@@GLIBC_2.1
fun:_IO_file_sync@@GLIBC_2.1
fun:_IO_fflush_internal
fun:_Z12errHdlr10Severity
fun:_Z6LogInfoPKcz
fun:_Z21_checkOpenGLVersionv
}
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-30 18:50:03
|
On Mon, 29 Nov 2004, Leonard mckinley wrote: > 1) Is there a way to sanitize a memory buffer so that valgrind will > think it's been initialized? Use the VALGRIND_MAKE_READABLE macro -- see the docs for Memcheck. > The number of frames could be greatly reduced if valgrind supported > a wildcard syntax for matching 0..N frames containing a function call, > similar to what Rational Purify does. E.g.: > > # Conditional jump or move depends on uninitialised value(s) > RHH__UMR_NVIDIA_6629__checkOpenGLVersion4 > Memcheck:Cond > fun:* > fun:_Z21_checkOpenGLVersionv That's actually valid existing syntax. However, the wildcard '*' indicates that the name of the first "fun" in the stack trace can be anything, not that any number of "fun" entries can appear before _Z21_checkOpenGLVersionv. Syntax to handle what you suggest would be a good thing. N |
|
From: Neil Y. <nei...@wi...> - 2004-12-01 08:35:45
|
> > The number of frames could be greatly reduced if valgrind supported > > a wildcard syntax for matching 0..N frames containing a > function call, > > similar to what Rational Purify does. E.g.: > > > > # Conditional jump or move depends on uninitialised value(s) > > RHH__UMR_NVIDIA_6629__checkOpenGLVersion4 > > Memcheck:Cond > > fun:* > > fun:_Z21_checkOpenGLVersionv > > That's actually valid existing syntax. However, the wildcard '*' > indicates that the name of the first "fun" in the stack trace can be > anything, not that any number of "fun" entries can appear before > _Z21_checkOpenGLVersionv. Syntax to handle what you suggest > would be a > good thing. Some variant of the XPATH syntax from XML might be appropriate here, e.g. func1/func2 is func2 called directly from func1 func1//func2 is any call tree where func2 is called directly/indirectly from func1 //func1 is any call path to func1 Of course this doesn't map to the current syntax, so maybe it could be adapted to look like fun:func1 fun:// fun:func2 Neil Youngman |
|
From: Andy B. <val...@th...> - 2004-12-01 21:57:49
|
On Wed, 2004-12-01 at 02:35, Neil Youngman wrote: > > > # Conditional jump or move depends on uninitialised value(s) > > > RHH__UMR_NVIDIA_6629__checkOpenGLVersion4 > > > Memcheck:Cond > > > fun:* > > > fun:_Z21_checkOpenGLVersionv > > > > That's actually valid existing syntax. However, the wildcard '*' > > indicates that the name of the first "fun" in the stack trace can be > > anything, not that any number of "fun" entries can appear before > > _Z21_checkOpenGLVersionv. Syntax to handle what you suggest > > would be a > > good thing. > > Some variant of the XPATH syntax from XML might be appropriate here, > e.g. > func1/func2 is func2 called directly from func1 > func1//func2 is any call tree where func2 is called > directly/indirectly from func1 > //func1 is any call path to func1 >... What about replacing the colon with asterisk to mean "more than one"? fun:* the name of fun in this position can be anything fun*x any number of fun in series with name matching x fun** any number of fun in series with name that can be anything fun*x* any number of fun in series with name matching x* Essentially making the separator character indicate a count of one or many. |
|
From: Sebastian K. <Seb...@so...> - 2004-12-01 13:21:44
|
Nicholas Nethercote wrote: > That's actually valid existing syntax. However, the wildcard '*' indicates that the name of the first "fun" in the stack trace can be anything, not that any number of "fun" entries can appear before _Z21_checkOpenGLVersionv. Syntax to handle what you suggest would be a good thing. BTW. is there some syntax to suppress message for a very shallow stack trace (but to allow the same message when the trace is deeper, but has exactly the same beginning), for example: fun: strcmp fun: __some_init nothing: is suppressed but: fun: strcmp fun: __some_init fun: myownfun1 fun: myownfun2 is not. For exampele in my Mandrake 9.0 glibc-devel there is a situation when some glibc init code calls some common string operation and that operation has some error. And statck trace is just that string operation -- nothing more. Of course my app also calls that string operation (but then stack trace is deeper). Now I want to suppress the the error from init code, but still catch problems in my app. Suppression file entry being just fun: strop makes will suppress warnings from all calls to strop, but I can't put deeper stack trace template since the trace from the erratic init call has just one entry. rgds -- Sebastian Kaliszewski |
|
From: Leonard m. <spa...@ya...> - 2004-12-01 17:10:46
|
Nicholas Nethercote: > On Mon, 29 Nov 2004, Leonard mckinley wrote: > > > 1) Is there a way to sanitize a memory buffer so that valgrind > > will think it's been initialized? > > Use the VALGRIND_MAKE_READABLE macro -- see the docs for Memcheck. Ah, that's good to know. > > The number of frames could be greatly reduced if valgrind > > supported a wildcard syntax for matching 0..N frames containing > > a function call > > the wildcard '*' > indicates that the name of the first "fun" in the stack trace can be > anything, not that any number of "fun" entries can appear before > _Z21_checkOpenGLVersionv. Syntax to handle what you suggest would > be a good thing. Thanks. I can't really put valgrind-specific macros in this application, so the wildcard syntax would be great to have -- in this and in many other similar situations. __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo |