]> granicus.if.org Git - sudo/commitdiff
Disable Address Sanitizer leak detection for tests which generate
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Sep 2016 14:33:01 +0000 (08:33 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Sep 2016 14:33:01 +0000 (08:33 -0600)
parse errors.  The parser leaks a bit on error.

plugins/sudoers/Makefile.in
plugins/sudoers/regress/testsudoers/test4.sh
plugins/sudoers/regress/testsudoers/test5.sh

index 6269656438cb71bae95a44d02ef134bf7cedd7f1..ba7f631afbebc09b5a60da959cd08b8abd399b1a 100644 (file)
@@ -386,7 +386,8 @@ check: $(TEST_PROGS) visudo testsudoers
                out="regress/sudoers/$${base}.out"; \
                toke="regress/sudoers/$${base}.toke"; \
                json="regress/sudoers/$${base}.json"; \
-               ./testsudoers -dt <$$t >$$out 2>$$toke || true; \
+               ASAN_OPTIONS=detect_leaks=0 \
+                   ./testsudoers -dt <$$t >$$out 2>$$toke || true; \
                if cmp $$out $(srcdir)/$$out.ok >/dev/null; then \
                    passed=`expr $$passed + 1`; \
                    echo "$$dir/$$base (parse): OK"; \
index 03947f34c7cf5c420e3b82c7f39fac6205ad6680..3eaaa1dac96fcc8b84b79a2b1ecc75761e8f8823 100755 (executable)
@@ -3,6 +3,9 @@
 # Test sudoers owner check
 #
 
+# Avoid warnings about memory leaks when there is a syntax error
+ASAN_OPTIONS=detect_leaks=0; export ASAN_OPTIONS
+
 exec 2>&1
 ./testsudoers -U 1 root id <<EOF
 #include $TESTDIR/test2.inc
index 73855a3ae8a7a3e7ed4db8e656d3bd337c151918..9e690a6b40faa742c29d42261e28c29fd0c50337 100755 (executable)
@@ -3,6 +3,9 @@
 # Test sudoers file mode check
 #
 
+# Avoid warnings about memory leaks when there is a syntax error
+ASAN_OPTIONS=detect_leaks=0; export ASAN_OPTIONS
+
 # Create test file
 TESTFILE=`pwd`/regress/testsudoers/test5.inc
 cat >$TESTFILE <<EOF