-/* Copyright (c) 2014-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2014-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <csignal>
#include <cstring>
#include <simgrid/modelchecker.h>
#include <simgrid/s4u.hpp>
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
+ raise(SIGSEGV); // Simulate a segfault without displeasing the static analyzers
} else {
DIE_IMPOSSIBLE;
}
e.load_platform(argv[2]);
- simgrid::s4u::Actor::create("app", simgrid::s4u::Host::by_name("Fafard"), &app);
+ simgrid::s4u::Actor::create("app", e.host_by_name("Fafard"), &app);
e.run();
}