X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ea74f5d95928a521a588737e81f1de94eef25d19..b41e6a1f15f499dfd49ec43164fc833ad2ffc04c:/teshsuite/mc/random-bug/random-bug.cpp diff --git a/teshsuite/mc/random-bug/random-bug.cpp b/teshsuite/mc/random-bug/random-bug.cpp index f5ea17ad87..ba82292333 100644 --- a/teshsuite/mc/random-bug/random-bug.cpp +++ b/teshsuite/mc/random-bug/random-bug.cpp @@ -1,9 +1,10 @@ -/* Copyright (c) 2014-2022. 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 +#include #include #include #include @@ -30,11 +31,8 @@ static void app() 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; }