[Ada] Fix possible uninitialized ATCB component use
authorPhilippe Gil <gil@adacore.com>
Fri, 27 Nov 2020 10:14:15 +0000 (11:14 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 16 Dec 2020 13:01:02 +0000 (08:01 -0500)
gcc/ada/

* libgnarl/s-tporft.adb (Register_Foreign_Thread): Set
Global_Task_Lock_Nesting before using allocator.

gcc/ada/libgnarl/s-tporft.adb

index 9d99eac80c2c3025f54a9ab2c3a10a9253b7ee73..634eae63ea325a0d0af596ea3c0554dc469174a1 100644 (file)
@@ -53,6 +53,7 @@ begin
 
    Local_ATCB.Common.LL.Thread := Thread;
    Local_ATCB.Common.Current_Priority := System.Priority'First;
+   Local_ATCB.Common.Global_Task_Lock_Nesting := 0;
    Specific.Set (Local_ATCB'Unchecked_Access);
 
    --  It is now safe to use an allocator