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

They hate this.
This commit is contained in:
Nick Mathewson 2014-09-02 13:56:31 -04:00
parent 9b850f9200
commit 32b88d2565

View File

@ -30,7 +30,12 @@ int
crash(int x) crash(int x)
{ {
if (crashtype == 0) { 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; *(volatile int *)0 = 0;
#endif
} else if (crashtype == 1) { } else if (crashtype == 1) {
tor_assert(1 == 0); tor_assert(1 == 0);
} else if (crashtype == -1) { } else if (crashtype == -1) {