]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Ensure Default_Stack_Size is greater than Minimum_Stack_Size
authorJohannes Kliemann <kliemann@adacore.com>
Tue, 4 Apr 2023 09:24:39 +0000 (11:24 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 30 May 2023 07:12:16 +0000 (09:12 +0200)
commit2a794b7750cbc9aa8b0c5778cc34b50a72e0f7a0
tree8981cb0c6a405ab769b76757e4789d49c9de821d
parent53b05858fb070f3a21818d1649c73c9f90c6745a
ada: Ensure Default_Stack_Size is greater than Minimum_Stack_Size

The Default_Stack_Size function does not check that the binder specified
default stack size is greater than the minimum stack size for the runtime.
This can result in tasks using default stack sizes less than the minimum
stack size because the Adjust_Storage_Size only adjusts storages sizes for
tasks that explicitly specify a storage size. To avoid this, the binder
specified default stack size is round up to the minimum stack size if
required.

gcc/ada/

* libgnat/s-parame.adb: Check that Default_Stack_Size >=
Minimum_Stack_size.
* libgnat/s-parame__rtems.adb: Ditto.
* libgnat/s-parame__vxworks.adb: Check that Default_Stack_Size >=
Minimum_Stack_size and use the proper Minimum_Stack_Size if
Stack_Check_Limits is enabled.
gcc/ada/libgnat/s-parame.adb
gcc/ada/libgnat/s-parame__rtems.adb
gcc/ada/libgnat/s-parame__vxworks.adb