[clang] [clang-tools-extra] Fix OOM in FormatDiagnostic (PR #108187)
Vakhurin Sergei via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 11 03:52:22 PDT 2024
================
@@ -1333,13 +1263,7 @@ class DiagnosticBuilder : public StreamingDiagnostic {
public:
/// Copy constructor. When copied, this "takes" the diagnostic info from the
/// input and neuters it.
- DiagnosticBuilder(const DiagnosticBuilder &D) : StreamingDiagnostic() {
- DiagObj = D.DiagObj;
- DiagStorage = D.DiagStorage;
----------------
igelbox wrote:
Well well, `DiagStorage` might be allocated via `DiagStorageAllocator` so this looked like a potential memory manager mess. Now, I fixed this (see cpp).
https://github.com/llvm/llvm-project/pull/108187
More information about the cfe-commits
mailing list