Properly account for padding in PUTARG_SPLIT with GT_FIELD_LIST (#57279)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Sat, 14 Aug 2021 09:10:06 +0000 (11:10 +0200)
committerGitHub <noreply@github.com>
Sat, 14 Aug 2021 09:10:06 +0000 (11:10 +0200)
commitb2fc310998f1d25ed01102a47366f89b5c1c9e9c
treee5a2df9d04a8cce85dd851226e8462e5cb71650c
parent1f26d24c0ffba88504d66736d5000e7f750f0f58
Properly account for padding in PUTARG_SPLIT with GT_FIELD_LIST (#57279)

We were writing the stack part to the outgoing stack area by a loop
incrementing the offset by the written size in each iteration. However,
it is possible due to padding and optimization that the written size is
smaller than the delta to the next field. Instead, use the offset of
each field minus the offset of the first stack field to find the offset
in the outgoing arg area.

Fix #57064
src/coreclr/jit/codegenarmarch.cpp
src/tests/JIT/Regression/JitBlue/Runtime_57064/Runtime_57064.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_57064/Runtime_57064.csproj [new file with mode: 0644]