未验证 提交 d940a01a 编写于 作者: J Jan Kotas 提交者: GitHub

Fix GC stress failure in LoaderAllocator::CompareExchangeValueInHandle (#70832)

InterlockedCompareExchangeT has to be called on a raw Object* to make the GC stress infrastructure happy.
上级 b6e2e1c8
......@@ -920,7 +920,7 @@ OBJECTREF LoaderAllocator::CompareExchangeValueInHandle(LOADERHANDLE handle, OBJ
{
OBJECTREF *ptr = (OBJECTREF *)(((UINT_PTR)handle) - 1);
gc.previous = InterlockedCompareExchangeT(ptr, gc.value, gc.compare);
gc.previous = ObjectToOBJECTREF(InterlockedCompareExchangeT((Object **)ptr, OBJECTREFToObject(gc.value), OBJECTREFToObject(gc.compare)));
if (gc.previous == gc.compare)
{
ErectWriteBarrier(ptr, gc.value);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册