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

Commit

Permalink
Merge pull request #6889 from JosephTremoulet/StaticField
Browse files Browse the repository at this point in the history
Fix IMGREL32 static field addr value-num blindspot
  • Loading branch information
JosephTremoulet authored Sep 8, 2016
2 parents 2448e08 + e4cb4dd commit 2008454
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
26 changes: 15 additions & 11 deletions src/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15718,19 +15718,23 @@ bool GenTree::IsFieldAddr(Compiler* comp, GenTreePtr* pObj, GenTreePtr* pStatic,
baseAddr = gtOp.gtOp1;
}
}
// Check if "this" has a zero-offset annotation.
else if (comp->GetZeroOffsetFieldMap()->Lookup(this, &newFldSeq))
{
baseAddr = this;
mustBeStatic = true;
}
else if (OperGet() == GT_CNS_INT && gtIntCon.gtFieldSeq != nullptr)
{
// Address is a literal constant; must be a static field.
newFldSeq = gtIntCon.gtFieldSeq;
baseAddr = this;
mustBeStatic = true;
}
else
{
// Check if "this" has a zero-offset annotation.
if (!comp->GetZeroOffsetFieldMap()->Lookup(this, &newFldSeq))
{
// If not, this is not a field address.
return false;
}
else
{
baseAddr = this;
mustBeStatic = true;
}
// This is not a field address.
return false;
}

// If not we don't have a field seq, it's not a field address.
Expand Down
2 changes: 1 addition & 1 deletion tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private static void ThreadMain()

private class BlockingFinalizerOnShutdown
{
public static bool finalizerCompletedOnce = false;
public volatile static bool finalizerCompletedOnce = false;
public bool isLastObject = false;

~BlockingFinalizerOnShutdown()
Expand Down

0 comments on commit 2008454

Please sign in to comment.