Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Port JIT fix to Preview 8: ensure fgFirstBB has appropriate flags
Port of #40038 to Preview 8.

Fix #39023

Release jits might sometimes generate bad GC info.

Mysterious intermittent crashes. Without this fix jit GC
info generation for some methods is non-deterministically bad.

Yes, problem does not occur in 3.1.

Very low.
  • Loading branch information
AndyAyersMS committed Jul 29, 2020
commit dfccb3ffb4eaed1ab3b13ea74186ec7d7b4ccf9f
5 changes: 4 additions & 1 deletion src/coreclr/src/jit/flowgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ void Compiler::fgInit()
#ifdef FEATURE_SIMD
fgPreviousCandidateSIMDFieldAsgStmt = nullptr;
#endif

fgHasSwitch = false;
}

bool Compiler::fgHaveProfileData()
Expand Down Expand Up @@ -476,7 +478,8 @@ void Compiler::fgEnsureFirstBBisScratch()

noway_assert(fgLastBB != nullptr);

block->bbFlags |= (BBF_INTERNAL | BBF_IMPORTED);
// Set the expected flags
block->bbFlags |= (BBF_INTERNAL | BBF_IMPORTED | BBF_JMP_TARGET | BBF_HAS_LABEL);

// This new first BB has an implicit ref, and no others.
block->bbRefs = 1;
Expand Down