[Tizen] Revert "Pass zero length array as null" https://github.com/dotnet/coreclr...
authorGleb Balykov <g.balykov@samsung.com>
Wed, 2 Mar 2022 19:37:30 +0000 (22:37 +0300)
committerGleb Balykov <g.balykov@samsung.com>
Tue, 27 Sep 2022 12:50:22 +0000 (15:50 +0300)
commit7e57bbe4bcd464c76ef704d85ce922003d4fbbd2
tree31acf350da62b2e607c6a8b87da285535985e717
parentbb54cee92bfb17f3791f93395417c83907455069
[Tizen] Revert "Pass zero length array as null" https://github.com/dotnet/coreclr/pull/27555

Without this revert two coreclr tests fail if they are compiled with inputbubble and IL_STUB saving in ni:
- Interop/PInvoke/Array/MarshalArrayAsParam/AsDefault/AsDefaultTest/AsDefaultTest.sh
- Interop/PInvoke/Array/MarshalArrayAsParam/AsLPArray/AsLPArrayTest/AsLPArrayTest.sh

For both tests problem is exactly with array with 0 length, which is passed as NULL to native function.
But it should be a pointer to the non-existing element, and IL_STUB generated at runtime does exactly this.
src/coreclr/tools/Common/TypeSystem/Interop/IL/Marshaller.cs