aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bt_cl.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-02 13:56:31 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-02 13:56:31 -0400
commit32b88d2565daa47c087fb5610405fcb57c3ed153 (patch)
tree593964e9fb041c188de08bdca52f2f47a0bd3174 /src/test/test_bt_cl.c
parent9b850f9200c2d2eac4053cfaa74873bbbe4f0b95 (diff)
downloadtor-32b88d2565daa47c087fb5610405fcb57c3ed153.tar.gz
tor-32b88d2565daa47c087fb5610405fcb57c3ed153.zip
Don't include a backtrace test for dereferencing 0 under analyzers
They hate this.
Diffstat (limited to 'src/test/test_bt_cl.c')
-rw-r--r--src/test/test_bt_cl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test_bt_cl.c b/src/test/test_bt_cl.c
index 45ae82fb85..720ccd4627 100644
--- a/src/test/test_bt_cl.c
+++ b/src/test/test_bt_cl.c
@@ -30,7 +30,12 @@ int
crash(int x)
{
if (crashtype == 0) {
+#if defined(__clang_analyzer__) || defined(__COVERITY__)
+ tor_assert(1 == 0); /* Avert your eyes, clangalyzer and coverity! You
+ * don't need to see us dereference NULL. */
+#else
*(volatile int *)0 = 0;
+#endif
} else if (crashtype == 1) {
tor_assert(1 == 0);
} else if (crashtype == -1) {