[PATCH] D129120: ManagedStatic: remove many straightforward uses in llvm
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 5 12:03:28 PDT 2022
efriedma added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:10741
+ sys::SmartScopedLock<true> Lock(VTMutex);
+ return &(*EVTs.insert(VT).first);
}
----------------
efriedma wrote:
> This Mutex usage is dubious; at best this leaks memory; at worst, it's a miscompile waiting to happen.
>
> Granted, that's true even without this patch...
Oh, wait, nevermind... it's computing a unique address for the value, but it only cares about the pointer bits. Which I guess is dubious due to pointer provenance, but not likely to cause a practical issue.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129120/new/
https://reviews.llvm.org/D129120
More information about the llvm-commits
mailing list