[apparmor] [patch] parser - add valgrind test script (was fix dbus peer_conds memory leak)
Steve Beattie
steve at nxnw.org
Mon Sep 9 18:29:28 UTC 2013
On Fri, Sep 06, 2013 at 11:57:51AM -0700, Tyler Hicks wrote:
> Nice catch! (and shame on me for not using valgrind)
Well, we don't really make it easy to run valgrind regularly. In the
interest of fixing that, attached is a simple script for doing so,
along with a separate patch for fixing a few leaks that it found;
most occur in error paths, though there's a couple of legitimate ones
it found in parser_yacc.y. There are also more reported leaks that
I have not fully investigated yet.
It's also finding what may be some false positives around
invalid reads around profile serialization (e.g. on
simple_tests/conditional/else_if_5.sd) and conditional
jump or move depends on uninitialized value(s) (e.g.
simple_tests/network/network_ok_1.sd) that need more investigation,
to determine whether it's a legitimate issue or a valgrind check that
hopefully can be disabled.
Running the parser under valgrind on all 69000+ simple test cases
takes *way* too long to include it on by default; I kicked off a run
in a vm last night before going to bed and 10 hours later, it's still
going over the generated dbus tests. Thus I didn't include it in the
default 'make check' target.
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parser-add_simple_valgrind_test.py.patch
Type: text/x-diff
Size: 6317 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130909/e5f92302/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parser-fix_memory_leaks.patch
Type: text/x-diff
Size: 2136 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130909/e5f92302/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130909/e5f92302/attachment.pgp>
More information about the AppArmor
mailing list