浏览代码

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

They hate this.
Nick Mathewson 11 年之前
父节点
当前提交
32b88d2565
共有 1 个文件被更改,包括 5 次插入0 次删除
  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) {