Fix crash on Ubuntu 24.04 ARM64 (#1253)

On Ubuntu 24.04 ARM64, PTHREAD_STACK_MIN is 0x20000 which does not fit
in unsigned short, size of which is 2 bytes. Casting PTHREAD_STACK_MIN
to unsigned short in FreeRTOSConfig.h results in
configMINIMAL_STACK_SIZE getting defined to 0 which leads to SIGSEV.

This change removes the not needed casting of PTHREAD_STACK_MIN to
unsigned short.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
Gaurav-Aggarwal-AWS 2024-08-23 12:47:47 +05:30 committed by GitHub
parent c304913b64
commit 059165fbf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -114,10 +114,10 @@ void vApplicationStackOverflowHook( TaskHandle_t pxTask,
void vApplicationTickHook( void );
void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
StackType_t ** ppxIdleTaskStackBuffer,
uint32_t * pulIdleTaskStackSize );
configSTACK_DEPTH_TYPE * pulIdleTaskStackSize );
void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
StackType_t ** ppxTimerTaskStackBuffer,
uint32_t * pulTimerTaskStackSize );
configSTACK_DEPTH_TYPE * pulTimerTaskStackSize );
#if ( projENABLE_TRACING == 1 )
@ -392,7 +392,7 @@ void vAssertCalled( const char * const pcFileName,
* used by the Idle task. */
void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
StackType_t ** ppxIdleTaskStackBuffer,
uint32_t * pulIdleTaskStackSize )
configSTACK_DEPTH_TYPE * pulIdleTaskStackSize )
{
/* If the buffers to be provided to the Idle task are declared inside this
* function then they must be declared static - otherwise they will be allocated on
@ -420,7 +420,7 @@ void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
* to provide the memory that is used by the Timer service task. */
void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
StackType_t ** ppxTimerTaskStackBuffer,
uint32_t * pulTimerTaskStackSize )
configSTACK_DEPTH_TYPE * pulTimerTaskStackSize )
{
/* If the buffers to be provided to the Timer task are declared inside this
* function then they must be declared static - otherwise they will be allocated on