Only stack allocate when marshalling Utf8 arguments (#74478)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Thu, 25 Aug 2022 10:42:20 +0000 (19:42 +0900)
committerGitHub <noreply@github.com>
Thu, 25 Aug 2022 10:42:20 +0000 (19:42 +0900)
commit442c137891821a567e9a05411f821dbf2aec5aa5
tree0c2bd5315a5d495fd6b317f035f3c619c8048e84
parent5764faf1b790139fdba4d6ff547ebb18f34ebc14
Only stack allocate when marshalling Utf8 arguments (#74478)

* Only stack allocate when marshalling Utf8 arguments

Fixes #74394.

* Review feedback
src/coreclr/tools/Common/TypeSystem/Interop/IL/Marshaller.cs
src/tests/nativeaot/SmokeTests/PInvoke/PInvoke.cs
src/tests/nativeaot/SmokeTests/PInvoke/PInvokeNative.cpp