From: Todd C. Miller Date: Tue, 14 Feb 2017 22:56:34 +0000 (-0700) Subject: Only inhibit ASAN leak detector for tests that result in a parse X-Git-Tag: SUDO_1_8_20^2~108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5266f9ebae9e0a30a018c1591a8110714a1dcd5;p=sudo Only inhibit ASAN leak detector for tests that result in a parse error. The parser cannot currently clean up completely on error. --- diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index 48e03f7a3..517e8b4bd 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -390,7 +390,12 @@ check: $(TEST_PROGS) visudo testsudoers out="regress/sudoers/$${base}.out"; \ toke="regress/sudoers/$${base}.toke"; \ json="regress/sudoers/$${base}.json"; \ - ASAN_OPTIONS=detect_leaks=0 \ + if test -s $$json.ok; then \ + ASAN_OPTIONS=; \ + else \ + ASAN_OPTIONS=detect_leaks=0; \ + fi; \ + ASAN_OPTIONS=$$ASAN_OPTIONS \ ./testsudoers -dt <$$t >$$out 2>$$toke || true; \ if cmp $$out $(srcdir)/$$out.ok >/dev/null; then \ passed=`expr $$passed + 1`; \