Browse Source

Don't include a backtrace test for dereferencing 0 under analyzers

They hate this.
Nick Mathewson 9 years ago
parent
commit
32b88d2565
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/test/test_bt_cl.c

+ 5 - 0
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) {