Asan alloc-dealloc-mismatch
authorHyungju Lee <leee.lee@samsung.com>
Mon, 8 Aug 2022 00:20:42 +0000 (09:20 +0900)
committerGleb Balykov <g.balykov@samsung.com>
Tue, 27 Sep 2022 12:50:22 +0000 (15:50 +0300)
src/coreclr/debug/daccess/daccess.cpp
src/coreclr/debug/daccess/dacdbiimpl.cpp

index dee4fe132fa74c66002e9eddb2ec478ef3695226..f638b40ee8dcda69c8c5586906a03ba5b9baaf8a 100644 (file)
@@ -6155,7 +6155,7 @@ ClrDataAccess::GetMethodNativeMap(MethodDesc* methodDesc,
 
     // Bounds info.
     ULONG32 countMapCopy;
-    NewHolder<ICorDebugInfo::OffsetMapping> mapCopy(NULL);
+    NewArrayHolder<ICorDebugInfo::OffsetMapping> mapCopy(NULL);
 
     BOOL success = DebugInfoManager::GetBoundariesAndVars(
         request,
index b996a7e30c2ec1fa249433c8756d056c75ff7762..e848cfcc2a9d9241f8189d50023ce801b6a41954 100644 (file)
@@ -185,7 +185,7 @@ void DeleteDbiMemory(void* p)
     }
     else
     {
-        ::delete (BYTE*)p;
+        ::delete[] (BYTE*)p;
     }
 }