diff options
author | Pat Gavlin <pagavlin@microsoft.com> | 2016-09-30 16:27:30 -0700 |
---|---|---|
committer | Pat Gavlin <pagavlin@microsoft.com> | 2016-09-30 16:27:30 -0700 |
commit | dc90d45180e75304bb5c0361e0f192d9a3bf5de9 (patch) | |
tree | 58eaf09e965a2302011942797d7ebd1006c9eca1 /src/jit/lclvars.cpp | |
parent | 5fb3c61d74899b1eed6400a9bcefed6367385a73 (diff) | |
download | coreclr-dc90d45180e75304bb5c0361e0f192d9a3bf5de9.tar.gz coreclr-dc90d45180e75304bb5c0361e0f192d9a3bf5de9.tar.bz2 coreclr-dc90d45180e75304bb5c0361e0f192d9a3bf5de9.zip |
Properly initialize lvaTrackedVarSet.
The lack of initialization when `lvaCount == 0` was causing failures
under JITStressRegs=0x80. When this initialization is not performed,
it is initialized s.t. every bit is set, including bits that represent
non-existent lclVars. This caused LSRA to AV when attempting to access
the lclVar table using a lclNum derived from an iteration over
`lvaTrackedVarSet`.
Fixes #7090.
Diffstat (limited to 'src/jit/lclvars.cpp')
-rw-r--r-- | src/jit/lclvars.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/jit/lclvars.cpp b/src/jit/lclvars.cpp index 0afaf20638..06d09ff40d 100644 --- a/src/jit/lclvars.cpp +++ b/src/jit/lclvars.cpp @@ -2689,6 +2689,10 @@ void Compiler::lvaSortByRefCount() lvaTrackedCount = 0; lvaTrackedCountInSizeTUnits = 0; +#ifdef DEBUG + VarSetOps::AssignNoCopy(this, lvaTrackedVars, VarSetOps::MakeEmpty(this)); +#endif + if (lvaCount == 0) { return; |