From e65be5fccf46d07d89fea186e8832442446be33a Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 5 May 2023 11:25:21 -0400 Subject: [PATCH 1/3] Fix #2301, adjust UT pool buffer size for platform config If the CFE_PLATFORM_ES_MAX_BLOCK_SIZE is increased, then increase the UT pool buffer accordingly. This had been hardcoded to 128k. Also consider pool exhaustion to be a fatal error, as continuing the test will certainly segfault and this makes the original error harder to spot. --- modules/core_api/ut-stubs/src/cfe_es_handlers.c | 2 ++ modules/core_private/ut-stubs/src/ut_support.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/core_api/ut-stubs/src/cfe_es_handlers.c b/modules/core_api/ut-stubs/src/cfe_es_handlers.c index 91e0f4323..e51c58f9a 100644 --- a/modules/core_api/ut-stubs/src/cfe_es_handlers.c +++ b/modules/core_api/ut-stubs/src/cfe_es_handlers.c @@ -420,6 +420,8 @@ void UT_DefaultHandler_CFE_ES_GetPoolBuf(void *UserObj, UT_EntryKey_t FuncKey, c */ UtAssert_Failed("Pool buffer empty in %s: need at least %lu bytes, given %lu", __func__, (unsigned long)PositionEnd, (unsigned long)PoolSize); + + UtAssert_Abort("Configuration error, pool buffer too small for test cases"); } } diff --git a/modules/core_private/ut-stubs/src/ut_support.c b/modules/core_private/ut-stubs/src/ut_support.c index 887ce1125..b352e05b9 100644 --- a/modules/core_private/ut-stubs/src/ut_support.c +++ b/modules/core_private/ut-stubs/src/ut_support.c @@ -50,7 +50,7 @@ typedef union long long int AlignLong; long double AlignDbl; void * AlignPtr; - char Content[128 * 1024]; + char Content[2 * CFE_PLATFORM_ES_MAX_BLOCK_SIZE]; } UT_Buffer_t; static UT_Buffer_t UT_CFE_ES_MemoryPool; From ee1f32ab599a312eac46ff05f5f2e8e8cbf59b2f Mon Sep 17 00:00:00 2001 From: "Martinez Pedraza, Jose F. (GSFC-5820)" Date: Mon, 8 May 2023 12:08:16 -0400 Subject: [PATCH 2/3] Fix #2327, Remove unused CFE_PLATFORM_ES_RESET_AREA_SIZE --- .../es/config/default_cfe_es_internal_cfg.h | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/modules/es/config/default_cfe_es_internal_cfg.h b/modules/es/config/default_cfe_es_internal_cfg.h index 3eaf81527..cb9bbee28 100644 --- a/modules/es/config/default_cfe_es_internal_cfg.h +++ b/modules/es/config/default_cfe_es_internal_cfg.h @@ -328,29 +328,6 @@ */ #define CFE_PLATFORM_ES_USER_RESERVED_SIZE (1024 * 1024) -/** -** \cfeescfg Define ES Reset Area Size -** -** \par Description: -** The ES Reset Area Size. This is the size in bytes of the cFE Reset variable -** and log area. This is a block of memory used by the cFE to store the system -** log ER Log and critical reset variables. This is 4 of 4 of the memory areas -** that are preserved during a processor reset. -** Note: This area must be sized large enough to hold all of the data -** structures. It should be automatically sized based on the CFE_ES_ResetData_t -** type, but circular dependencies in the headers prevent it from being defined -** this way. -** NOTE: Changing this value changes memory allocation, and may -** require changes to platform specific values (in CFE_PSP) such as -** USER_RESERVED_MEM in VxWorks depending on the memory areas -** being used for preserved data and on OS specific behavior. -** -** \par Limits -** There is a lower limit of 153600 (150KBytes) and an upper limit of UINT_MAX -** (4 Gigabytes) on this configuration parameter. -*/ -#define CFE_PLATFORM_ES_RESET_AREA_SIZE (170 * 1024) - /** ** \cfeescfg Define Memory Pool Alignment Size ** From 2a0a7667a3d33c6cff651c21995d32cd97d20433 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 12 May 2023 13:50:16 -0400 Subject: [PATCH 3/3] Bump to v7.0.0-rc4+dev312 --- CHANGELOG.md | 5 +++++ modules/core_api/fsw/inc/cfe_version.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 870ca5c88..59bc61b04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Development Build: v7.0.0-rc4+dev312 +- adjust UT pool buffer size for platform config +- Remove unused CFE_PLATFORM_ES_RESET_AREA_SIZE +- See and + ## Development Build: v7.0.0-rc4+dev304 - reorganize headers - Update XML files per interoperability testing diff --git a/modules/core_api/fsw/inc/cfe_version.h b/modules/core_api/fsw/inc/cfe_version.h index 40ab3c02f..6711cef17 100644 --- a/modules/core_api/fsw/inc/cfe_version.h +++ b/modules/core_api/fsw/inc/cfe_version.h @@ -26,7 +26,7 @@ #define CFE_VERSION_H /* Development Build Macro Definitions */ -#define CFE_BUILD_NUMBER 304 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ +#define CFE_BUILD_NUMBER 312 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ #define CFE_BUILD_BASELINE "v7.0.0-rc4" /**< @brief Development: Reference git tag for build number */ /* See \ref cfsversions for definitions */