mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Don't include a backtrace test for dereferencing 0 under analyzers
They hate this.
This commit is contained in:
parent
9b850f9200
commit
32b88d2565
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user