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

Commit

Permalink
ARM64: Fix WriteBarrier
Browse files Browse the repository at this point in the history
I think this finally fixes most of long outstanding GC issues that appear in different
forms so far.

The issues was WriteBarrier implementation is wrong.
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 out of date build, so there are not found
assembly errors like System.Runtime.Extensions with different versions,
though. These are what I tested so far.
System.Collections.Tests
System.Dynamic.Runtime.Tests
System.Linq.Expressions.Tests

Potentially more coreclr tests will pass. I will update them as tests go.
  • Loading branch information
kyulee1 committed Jun 15, 2016
1 parent 44ad10c commit 524eef1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/vm/arm64/asmhelpers.asm
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ NotInHeap
;
WRITE_BARRIER_ENTRY JIT_WriteBarrier
dmb ST
str x15, [x14], 8
str x15, [x14]

; Branch to Exit if the reference is not in the Gen0 heap
;
Expand Down Expand Up @@ -332,6 +332,7 @@ UpdateCardTable
mov x12, 0xFF
strb w12, [x15]
Exit
add x14, x14, 8
ret lr
WRITE_BARRIER_END JIT_WriteBarrier

Expand Down
4 changes: 2 additions & 2 deletions tests/arm64/Tests.lst
Original file line number Diff line number Diff line change
Expand Up @@ -20850,14 +20850,14 @@ RelativePath=GC\Scenarios\BinTree\thdtreegrowingobj\thdtreegrowingobj.cmd
WorkingDir=GC\Scenarios\BinTree\thdtreegrowingobj
Expected=0
MaxAllowedDurationSeconds=600
Categories=NEW;EXPECTED_FAIL;UNSTABLE
Categories=NEW;EXPECTED_PASS
HostStyle=0
[thdtreelivingobj.cmd_2992]
RelativePath=GC\Scenarios\BinTree\thdtreelivingobj\thdtreelivingobj.cmd
WorkingDir=GC\Scenarios\BinTree\thdtreelivingobj
Expected=0
MaxAllowedDurationSeconds=600
Categories=NEW;EXPECTED_FAIL
Categories=NEW;EXPECTED_PASS
HostStyle=0
[arrcpy.cmd_2993]
RelativePath=GC\Scenarios\Boxing\arrcpy\arrcpy.cmd
Expand Down

0 comments on commit 524eef1

Please sign in to comment.