From: Philippe Gil Date: Fri, 27 Nov 2020 10:14:15 +0000 (+0100) Subject: [Ada] Fix possible uninitialized ATCB component use X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=61c91059b966798928c805746eb64b11fbeab373;p=gcc.git [Ada] Fix possible uninitialized ATCB component use gcc/ada/ * libgnarl/s-tporft.adb (Register_Foreign_Thread): Set Global_Task_Lock_Nesting before using allocator. --- diff --git a/gcc/ada/libgnarl/s-tporft.adb b/gcc/ada/libgnarl/s-tporft.adb index 9d99eac80c2..634eae63ea3 100644 --- a/gcc/ada/libgnarl/s-tporft.adb +++ b/gcc/ada/libgnarl/s-tporft.adb @@ -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