Instead of actually dereferencing the null pointer (which drives the
static analyzers nuts), simply send myself a SIGSEGV.
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <cstring>
+#include <signal.h>
#include <simgrid/modelchecker.h>
#include <simgrid/s4u.hpp>
#include <xbt/log.h>
if (x == 3 && y == 4)
abort();
} else if (behavior == Behavior::SEGV) {
-#ifndef __clang_analyzer__
- int* A = nullptr;
if (x == 3 && y == 4)
- *A = 1;
-#endif
+ kill(getpid(), SIGSEGV); // Simulate a segfault without displeasing the static analyzers
} else {
DIE_IMPOSSIBLE;
}