Always treat incoming on-stack parameters as GC-untracked.
authorPat Gavlin <pagavlin@microsoft.com>
Tue, 18 Oct 2016 20:04:28 +0000 (13:04 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Tue, 18 Oct 2016 20:04:28 +0000 (13:04 -0700)
commit506bda16e4495fab7c873f1bbf3a372008c6de6b
tree6ae026c7b9efe931284fc84925bc9721550ff77b
parentc179be69c546d346d7f56fd13d5ae7d2e15e1857
Always treat incoming on-stack parameters as GC-untracked.

Incoming parameters that are passed on the stack are never reported as
tracked to the GC, but `lvaIsGCTracked` (which is used to determine
whether or not to report liveness for a lclVar's stack slot) still
returned true if the corresponding lclVar was tracked. This caused
problems on x86 when dealing with incoming GC stack parameters in ESP
frames: in this case, writes to a GC stack parameter could incorrectly
change the liveness for a lclVar at the same offset from ESP as the
parameter's offset from EBP.

Fixes dotnet/coreclr#7696.

Commit migrated from https://github.com/dotnet/coreclr/commit/a24d7e9eca0d1d8bf93f854bd9985a8e97526fab
src/coreclr/src/jit/codegencommon.cpp
src/coreclr/src/jit/compiler.hpp