[llvm] [offload] Do not pool memory while allocation traces are requested (PR #214752)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 07:46:13 PDT 2026
================
@@ -598,9 +598,13 @@ Error GenericDeviceTy::init(GenericPluginTy &Plugin) {
GridValues.GV_Max_WG_Size =
std::min(GridValues.GV_Max_WG_Size, uint32_t(OMP_TeamsThreadLimit));
- // Enable the memory manager if required.
+ // Enable the memory manager if required. Memory that the manager pools is
+ // not returned to the driver when it is freed, so a later access to it
+ // neither faults nor is reported by the allocation tracker. Leave the pool
+ // disabled while allocation traces are requested, so that we don't mask
+ // use-after-free (since they don't fault if the memory is still in the pool).
----------------
jhuber6 wrote:
This comment is really verbose.
https://github.com/llvm/llvm-project/pull/214752
More information about the llvm-commits
mailing list