aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/Shell/ScriptInterpreter/Python
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2022-03-05 15:14:20 -0600
committerJohannes Doerfert <johannes@jdoerfert.de>2022-03-25 11:38:54 -0500
commit4e34f061d65e7ee45765304088a0a831a203b85b (patch)
tree2c58533e2c3b8a074adfe0f7555db8be93fca1b8 /lldb/test/Shell/ScriptInterpreter/Python
parent61efe14e21b2c47a848f6d7500ed05af17c64a9a (diff)
downloadllvm-4e34f061d65e7ee45765304088a0a831a203b85b.zip
llvm-4e34f061d65e7ee45765304088a0a831a203b85b.tar.gz
llvm-4e34f061d65e7ee45765304088a0a831a203b85b.tar.bz2
[OpenMP][FIX] Ensure exclusive access to the HDTT map
This patch solves two problems with the `HostDataToTargetMap` (HDTT map) which caused races and crashes before: 1) Any access to the HDTT map needs to be exclusive access. This was not the case for the "dump table" traversals that could collide with updates by other threads. The new `Accessor` and `ProtectedObject` wrappers will ensure we have a hard time introducing similar races in the future. Note that we could allow multiple concurrent read-accesses but that feature can be added to the `Accessor` API later. 2) The elements of the HDTT map were `HostDataToTargetTy` objects which meant that they could be copied/moved/deleted as the map was changed. However, we sometimes kept pointers to these elements around after we gave up the map lock which caused potential races again. The new indirection through `HostDataToTargetMapKeyTy` will allows us to modify the map while keeping the (interesting part of the) entries valid. To offset potential cost we duplicate the ordering key of the entry which avoids an additional indirect lookup. We should replace more objects with "protected objects" as we go. Differential Revision: https://reviews.llvm.org/D121057
Diffstat (limited to 'lldb/test/Shell/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions