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

Commit 49c2eec

Browse files
committed
ARM64: Fix WriteBarrier
I think this finally fixes most of long outstanding GC issues that appear in different forms so far that include #4877, #4879, #4890 and more. The issues was WriteBarrier implementation. When we update card table, the address has been already incremented by 8. With this fix, all corefx tests seem to run on xunit framework without crashing. I verified this with an out-of-date build locally, so there are not found assembly errors like System.Runtime.Extensions with different versions, though. These are what I tested so far that safely finished all runs with very high percentage of pass. System.Collections.Tests System.Dynamic.Runtime.Tests System.Linq.Expressions.Tests System.Linq.Parallel.Tests Potentially more coreclr tests will pass. I will update them as tests go.
1 parent aaf5e7d commit 49c2eec

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/vm/arm64/asmhelpers.asm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ NotInHeap
303303
;
304304
WRITE_BARRIER_ENTRY JIT_WriteBarrier
305305
dmb ST
306-
str x15, [x14], 8
306+
str x15, [x14]
307307

308308
; Branch to Exit if the reference is not in the Gen0 heap
309309
;
@@ -332,6 +332,7 @@ UpdateCardTable
332332
mov x12, 0xFF
333333
strb w12, [x15]
334334
Exit
335+
add x14, x14, 8
335336
ret lr
336337
WRITE_BARRIER_END JIT_WriteBarrier
337338

tests/arm64/Tests.lst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,7 @@ RelativePath=baseservices\threading\interlocked\compareexchange\CompareExchangeT
24122412
WorkingDir=baseservices\threading\interlocked\compareexchange\CompareExchangeTClass
24132413
Expected=0
24142414
MaxAllowedDurationSeconds=600
2415-
Categories=NEW;EXPECTED_FAIL;UNSTABLE
2415+
Categories=NEW;EXPECTED_PASS
24162416
HostStyle=0
24172417
[CompareExchangeTClass_1.cmd_345]
24182418
RelativePath=baseservices\threading\interlocked\compareexchange\CompareExchangeTClass_1\CompareExchangeTClass_1.cmd
@@ -20850,14 +20850,14 @@ RelativePath=GC\Scenarios\BinTree\thdtreegrowingobj\thdtreegrowingobj.cmd
2085020850
WorkingDir=GC\Scenarios\BinTree\thdtreegrowingobj
2085120851
Expected=0
2085220852
MaxAllowedDurationSeconds=600
20853-
Categories=NEW;EXPECTED_FAIL;UNSTABLE
20853+
Categories=NEW;EXPECTED_PASS
2085420854
HostStyle=0
2085520855
[thdtreelivingobj.cmd_2992]
2085620856
RelativePath=GC\Scenarios\BinTree\thdtreelivingobj\thdtreelivingobj.cmd
2085720857
WorkingDir=GC\Scenarios\BinTree\thdtreelivingobj
2085820858
Expected=0
2085920859
MaxAllowedDurationSeconds=600
20860-
Categories=NEW;EXPECTED_FAIL
20860+
Categories=NEW;EXPECTED_PASS
2086120861
HostStyle=0
2086220862
[arrcpy.cmd_2993]
2086320863
RelativePath=GC\Scenarios\Boxing\arrcpy\arrcpy.cmd

0 commit comments

Comments
 (0)