diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-05-21 12:00:02 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-05-21 12:00:02 +0200 |
| commit | 40957b8193beeca88c723af690aae136c2d88d6b (patch) | |
| tree | 3bd1d6193c8763e13de9fd1a5c04b8fcea310bf1 /executor/common_linux.h | |
| parent | e503f048b0f40379900055c31da154292d105791 (diff) | |
executor: exit after first detected leak in C repros
Otherwise C repros print infinite stream of the same leaks again and again.
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 4c33acdea..ff3126641 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -2701,9 +2701,7 @@ static void check_leaks(void) ssize_t n = read(fd, buf, sizeof(buf) - 1); if (n < 0) fail("failed to read(%s)", KMEMLEAK_FILE); -#if SYZ_EXECUTOR int nleaks = 0; -#endif if (n != 0) { sleep(1); if (write(fd, "scan", 4) != 4) @@ -2738,18 +2736,14 @@ static void check_leaks(void) fprintf(stderr, "BUG: memory leak\n%s\n", pos); *next = prev; pos = next; -#if SYZ_EXECUTOR nleaks++; -#endif } } if (write(fd, "clear", 5) != 5) fail("failed to write(%s, \"clear\")", KMEMLEAK_FILE); close(fd); -#if SYZ_EXECUTOR if (nleaks) doexit(1); -#endif } #endif |
