aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilippe Gil <gil@adacore.com>2020-11-27 11:14:15 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-12-16 08:01:02 -0500
commit61c91059b966798928c805746eb64b11fbeab373 (patch)
treec48070fb81951bfcedc45aa3422c8e30b71022d4 /gcc
parente8070c83ab40c11447ecd42f467041d65df4e807 (diff)
downloadgcc-61c91059b966798928c805746eb64b11fbeab373.zip
gcc-61c91059b966798928c805746eb64b11fbeab373.tar.gz
gcc-61c91059b966798928c805746eb64b11fbeab373.tar.bz2
[Ada] Fix possible uninitialized ATCB component use
gcc/ada/ * libgnarl/s-tporft.adb (Register_Foreign_Thread): Set Global_Task_Lock_Nesting before using allocator.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/libgnarl/s-tporft.adb1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/libgnarl/s-tporft.adb b/gcc/ada/libgnarl/s-tporft.adb
index 9d99eac..634eae6 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