Skip to content

Commit

Permalink
move fence to the right place (dotnet#82661)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maoni0 committed Feb 26, 2023
1 parent 4b2a6e7 commit 85e85e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16832,7 +16832,8 @@ BOOL gc_heap::a_fit_segment_end_p (int gen_number,
// (see also: object.cpp/Object::ValidateInner)
// Make sure it will see cleaned up state to prevent triggering occasional verification failures.
// And make sure the write happens before updating "allocated"
VolatileStore(((void**)allocated - 1), (void*)0); //clear the sync block
((void**)allocated)[-1] = 0; // clear the sync block
VOLATILE_MEMORY_BARRIER();
#endif //VERIFY_HEAP && _DEBUG

uint8_t* old_alloc;
Expand Down

0 comments on commit 85e85e7

Please sign in to comment.