Fix ASAN violation under Samsung's netcoredbg (#69339)
authorMike McLaughlin <mikem@microsoft.com>
Mon, 16 May 2022 22:11:36 +0000 (15:11 -0700)
committerGleb Balykov <g.balykov@samsung.com>
Tue, 27 Sep 2022 12:50:22 +0000 (15:50 +0300)
commitefe94e5a63020e14a696a7caf387c00829b6c61e
treebed75918a3d8a25d450d45d3453652d1448f5432
parent669d160a564579f94baec8495d6de3110b7ec506
Fix ASAN violation under Samsung's netcoredbg (#69339)

* Fix ASAN violation under Samsung's netcoredbg

Fixes issue https://github.com/dotnet/runtime/issues/62281

The wrong holder was being used in DacDbiInterfaceImpl::GetNativeVarData(); change to NewArrayHolder.

Added new/delete operators to Exception so when it is thrown from the DAC and caught/deleted in DBI, the
correct C++ allocator is used. When the DAC is called by DBI, g_pAllocator points to the DBI allocator.

* Code review feedback
src/coreclr/debug/daccess/dacdbiimpl.cpp
src/coreclr/inc/ex.h
src/coreclr/utilcode/ex.cpp