Consider that retbuf arg can point to GC heap in fgCreateCallDispatcherAndGetResult...
authorEgor Chesakov <Egor.Chesakov@microsoft.com>
Thu, 30 Jul 2020 17:05:43 +0000 (10:05 -0700)
committerGitHub <noreply@github.com>
Thu, 30 Jul 2020 17:05:43 +0000 (10:05 -0700)
commit1e23a0629617ab18e259872f8fbb11d3f49efc2d
treed1a4574bc6e7fb2b2406080a4e67820a361e1173
parent65c9be6388a99739bd72dc2136f4a0a59b00db72
Consider that retbuf arg can point to GC heap in fgCreateCallDispatcherAndGetResult() (#39815)

Caller return buffer argument can point to GC heap while DispatchTailCalls expects the return value argument to point to the stack. We should use a temporary stack allocated return buffer to hold the value during the dispatcher call and copy the value back to the caller return buffer after that.
15 files changed:
src/coreclr/src/jit/morph.cpp
src/tests/JIT/HardwareIntrinsics/General/Vector128/Vector128_r.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector128/Vector128_ro.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector128_1/Vector128_1_r.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector128_1/Vector128_1_ro.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector256/Vector256_r.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector256/Vector256_ro.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector256_1/Vector256_1_r.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector256_1/Vector256_1_ro.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector64/Vector64_r.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector64/Vector64_ro.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector64_1/Vector64_1_r.csproj
src/tests/JIT/HardwareIntrinsics/General/Vector64_1/Vector64_1_ro.csproj
src/tests/JIT/Regression/JitBlue/Runtime_39581/Runtime_39581.il [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_39581/Runtime_39581.ilproj [new file with mode: 0644]