From 8a6e2dfa81841ea0eb1fb6c552c30711d03a2d9c Mon Sep 17 00:00:00 2001
From: Basile Desloges <basile.desloges@cea.fr>
Date: Fri, 17 Sep 2021 13:35:01 +0200
Subject: [PATCH] [eacsl] Update default stack and heap size

- The default values in `e-acsl-gcc.sh` are removed to always use those
  in `e_acsl_shadow_layout.h`
- The default values in `e_acsl_shadow_layout.h` are set to the values
  that were in `e-acsl-gcc.sh` since they were the values actually used
  by default.
---
 src/plugins/e-acsl/scripts/e-acsl-gcc.sh                      | 4 ++--
 .../observation_model/segment_model/e_acsl_shadow_layout.h    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/plugins/e-acsl/scripts/e-acsl-gcc.sh b/src/plugins/e-acsl/scripts/e-acsl-gcc.sh
index cab1f3ede72..8547ac9d2e1 100755
--- a/src/plugins/e-acsl/scripts/e-acsl-gcc.sh
+++ b/src/plugins/e-acsl/scripts/e-acsl-gcc.sh
@@ -349,8 +349,8 @@ OPTION_VALIDATE_FORMAT_STRINGS= # Runtime format string validation
 OPTION_LIBC_REPLACEMENTS= # Replace libc functions with RTL definitions
 OPTION_RTE_SELECT=        # Generate assertions for these functions only
 OPTION_THEN=              # Adds -then in front of -e-acsl in FC command.
-OPTION_STACK_SIZE=32      # Size of a heap shadow space (in MB)
-OPTION_HEAP_SIZE=128      # Size of a stack shadow space (in MB)
+OPTION_STACK_SIZE=        # Size of a heap shadow space (in MB)
+OPTION_HEAP_SIZE=         # Size of a stack shadow space (in MB)
 OPTION_KEEP_GOING=        # Report failing assertions but do not abort execution
 OPTION_EXTERNAL_ASSERT="" # Use custom definition of assert function
 OPTION_ASSERT_PRINT_DATA= # Print data contributing to a failed runtime assertion
diff --git a/src/plugins/e-acsl/share/e-acsl/observation_model/segment_model/e_acsl_shadow_layout.h b/src/plugins/e-acsl/share/e-acsl/observation_model/segment_model/e_acsl_shadow_layout.h
index 93de48c4ad3..f64825206dd 100644
--- a/src/plugins/e-acsl/share/e-acsl/observation_model/segment_model/e_acsl_shadow_layout.h
+++ b/src/plugins/e-acsl/share/e-acsl/observation_model/segment_model/e_acsl_shadow_layout.h
@@ -36,12 +36,12 @@
 
 /* Default size of a program's heap tracked via shadow memory */
 #ifndef E_ACSL_HEAP_SIZE
-#  define E_ACSL_HEAP_SIZE 512
+#  define E_ACSL_HEAP_SIZE 128
 #endif
 
 /* Default size of a program's stack tracked via shadow memory */
 #ifndef E_ACSL_STACK_SIZE
-#  define E_ACSL_STACK_SIZE 64
+#  define E_ACSL_STACK_SIZE 16
 #endif
 
 /* MAP_ANONYMOUS is a mmap flag indicating that the contents of allocated blocks
-- 
GitLab