Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit cf64892

Browse files
authored
Port #11730 to release/2.0.0 (#11744)
See notes for PR #11730 against master and Issue #11619.
1 parent 8ab4fb4 commit cf64892

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/jit/importer.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18592,7 +18592,20 @@ void Compiler::impDevirtualizeCall(GenTreeCall* call,
1859218592
#if defined(DEBUG)
1859318593
// Validate that callInfo has up to date method flags
1859418594
const DWORD freshBaseMethodAttribs = info.compCompHnd->getMethodAttribs(baseMethod);
18595-
assert(freshBaseMethodAttribs == baseMethodAttribs);
18595+
18596+
// All the base method attributes should agree, save that
18597+
// CORINFO_FLG_DONT_INLINE may have changed from 0 to 1
18598+
// because of concurrent jitting activity.
18599+
//
18600+
// Note we don't look at this particular flag bit below, and
18601+
// later on (if we do try and inline) we will rediscover why
18602+
// the method can't be inlined, so there's no danger here in
18603+
// seeing this particular flag bit in different states between
18604+
// the cached and fresh values.
18605+
if ((freshBaseMethodAttribs & ~CORINFO_FLG_DONT_INLINE) != (baseMethodAttribs & ~CORINFO_FLG_DONT_INLINE))
18606+
{
18607+
assert(!"mismatched method attributes");
18608+
}
1859618609
#endif // DEBUG
1859718610
}
1859818611

0 commit comments

Comments
 (0)