Skip to content

Commit 0bbd779

Browse files
max-charlambmikelle-rogers
authored andcommitted
Allow nibblemap deletes to be no-op (dotnet#109976)
* allow no-op deletes * improve comment
1 parent cd8d79e commit 0bbd779

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/coreclr/vm/codeman.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -4149,9 +4149,11 @@ void EEJitManager::NibbleMapDeleteUnlocked(HeapList* pHp, TADDR pCode)
41494149

41504150
PTR_DWORD pMap = pHp->pHdrMap;
41514151

4152-
// assert that the nibble is not empty and the DWORD is not a pointer
4152+
// Assert that the DWORD is not a pointer. Deleting a portion of a pointer
4153+
// would cause the state of the map to be invalid. Deleting empty nibbles,
4154+
// a no-op, is allowed and can occur when removing JIT data.
41534155
pMap += index;
4154-
_ASSERTE(((*pMap) & ~mask) && !IsPointer(*pMap));
4156+
_ASSERTE(!IsPointer(*pMap));
41554157

41564158
// delete the relevant nibble
41574159
VolatileStore<DWORD>(pMap, (*pMap) & mask);

0 commit comments

Comments
 (0)