[Openmp-commits] [llvm] [openmp] [Offload] Implement double free (and other allocation error) reporting (PR #100261)
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jul 23 16:25:52 PDT 2024
================
@@ -1337,6 +1340,25 @@ Expected<void *> GenericDeviceTy::dataAlloc(int64_t Size, void *HostPtr,
if (auto Err = PinnedAllocs.registerHostBuffer(Alloc, Alloc, Size))
return std::move(Err);
+ // Keep track of the allocation stack if we track allocation traces.
+ if (OMPX_TrackAllocationTraces) {
+ std::string StackTrace;
+ llvm::raw_string_ostream OS(StackTrace);
+ llvm::sys::PrintStackTrace(OS);
+
+ AllocationTraceInfoTy *ATI = new AllocationTraceInfoTy();
----------------
jdoerfert wrote:
I don't follow. They will live as long as the runtime.
https://github.com/llvm/llvm-project/pull/100261
More information about the Openmp-commits
mailing list