From 72e3c1b8f22dc9fbdc4fa167947358d2f599648e Mon Sep 17 00:00:00 2001 From: Basile Desloges <basile.desloges@cea.fr> Date: Thu, 18 Nov 2021 14:58:49 +0100 Subject: [PATCH] [eacsl] Update "thread-unsafe" warning for E-ACSL temporal analysis --- .../instrumentation_model/e_acsl_temporal_timestamp.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/e-acsl/share/e-acsl/instrumentation_model/e_acsl_temporal_timestamp.h b/src/plugins/e-acsl/share/e-acsl/instrumentation_model/e_acsl_temporal_timestamp.h index de1761e09ab..b0c1842e457 100644 --- a/src/plugins/e-acsl/share/e-acsl/instrumentation_model/e_acsl_temporal_timestamp.h +++ b/src/plugins/e-acsl/share/e-acsl/instrumentation_model/e_acsl_temporal_timestamp.h @@ -63,8 +63,12 @@ typedef struct temporal_parameter temporal_parameter; /*! \brief External array used to transfer parameters from one function * to another. * - * WARNING! NOT thread-safe! A better way would probably have it as - * __thread so it is local to every thread. */ + * WARNING! NOT thread-safe! First these global variables are not protected from + * concurrent accesses. Second the temporal system stores parameters before + * calling a function and pulls them inside the function. This is completely + * incompatible with a concurrent call since the parameters will be stored on + * one thread and pulled from another thread some later time, maybe after other + * synchronous calls. */ static temporal_parameter parameter_referents[MAX_PARAMETERS]; static uint32_t return_referent; -- GitLab