Use NewArrayHolder for array types in src/debug (dotnet/coreclr#24013)
authorOmair Majid <omajid@redhat.com>
Tue, 16 Apr 2019 05:14:48 +0000 (01:14 -0400)
committerJan Kotas <jkotas@microsoft.com>
Tue, 16 Apr 2019 05:14:48 +0000 (22:14 -0700)
commitc23d3920d46633bcd95b2e9e934e02b768d6275d
treec04952ae84b8cf77bab671f6b3ebe5ff16a6c754
parent44fbce8d75a4245d121af4d674a8f63355652555
Use NewArrayHolder for array types in src/debug (dotnet/coreclr#24013)

Using a NewHolder with array types means that when the holder is ready
to release the  memory, it ends up invoking `delete` (instead of
`delete[]`) on that array. This is an undefined behaviour.

Use NewArrayHolder isntead to fix this.

Commit migrated from https://github.com/dotnet/coreclr/commit/08318afbeb726eb80f212c70310e5750daec5abf
src/coreclr/src/debug/daccess/dacdbiimpl.cpp
src/coreclr/src/debug/di/process.cpp
src/coreclr/src/debug/di/rstype.cpp