[apparmor] [patch] valgrind test: improve suppressions for false positives
Tyler Hicks
tyhicks at canonical.com
Wed Feb 5 17:23:27 UTC 2014
On 2014-02-05 12:05:15, Seth Arnold wrote:
> On Wed, Feb 05, 2014 at 08:46:33AM -0800, Steve Beattie wrote:
> > Valgrind is reporting a false positive on the parser:
> >
> > ==13708== Invalid read of size 4
> > ==13708== at 0x40A1E2: yylex() (parser_lex.l:277)
> > ==13708== by 0x40FA94: yyparse() (parser_yacc.c:1487)
> > ==13708== by 0x40C639: process_profile(int, char const*) (parser_main.c:1001)
> > ==13708== by 0x40CA88: profile_dir_cb(__dirstream*, char const*, stat*, void*) (parser_main.c:1124)
> > ==13708== by 0x417068: dirat_for_each(__dirstream*, char const*, void*, int (*)(__dirstream*, char const*, stat*, void*)) (lib .c:117)
> > ==13708== by 0x404122: main (parser_main.c:1330)
> >
> > The valgrind test wrapper already has a suppression for this, but it's
> > too strict in that it doesn't handle the code path that comes through
> > profile_dir_cb(). The following patch widens the suppression on this.
> >
> > (For running valgrind manually, you can get the test script to dump the
> > current suppressions via:
> >
> > tst/valgrind_simple.py --dump-suppressions > my_suppressions_file
> >
> > which you can pass to your valgrind invocation like so:
> >
> > valgrind --suppressions=my_suppressions_file [blah blah]
> > )
> >
> > Signed-off-by: Steve Beattie <steve at nxnw.org>
>
> Acked-by: Seth Arnold <seth.arnold at canonical.com>
>
> Nice find, thanks
I've got a code fix that suppresses this warning. I'll send it out after
the parser tests pass.
Tyler
>
> > ---
> > parser/tst/valgrind_simple.py | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > Index: b/parser/tst/valgrind_simple.py
> > ===================================================================
> > --- a/parser/tst/valgrind_simple.py
> > +++ b/parser/tst/valgrind_simple.py
> > @@ -38,6 +38,7 @@ VALGRIND_SUPPRESSIONS = '''
> > fun:_Z?yylex?
> > fun:_Z*yyparse*
> > fun:_Z*process_profile*
> > + ...
> > fun:main
> > }
> >
> >
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140205/1aac2147/attachment.pgp>
More information about the AppArmor
mailing list