[mono][jit] Don't memset memory in increments lower than word size#73480
[mono][jit] Don't memset memory in increments lower than word size#73480BrzVlad merged 1 commit intodotnet:mainfrom
Conversation
If we memset a vt containing references, then, in order for preemptive GC and concurrent GC to work, writing to reference slots must happen atomically, otherwise GC might encounter a garbage ref. Also speeds up memset by about 15% for smaller valuetypes hitting this path on 64bit. More for extra large valuetypes.
|
Tagging subscribers to this area: @BrzVlad Issue DetailsIf we memset a vt containing references, then, in order for preemptive GC and concurrent GC to work, writing to reference slots must happen atomically, otherwise GC might encounter a garbage ref. Also speeds up memset by about 15% for smaller valuetypes hitting this path on 64bit. More for extra large valuetypes. Fixes #58828
|
|
This bug can be easily reproduced in a matter of seconds with the following test case: |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Should we backport this to 6.0? |
|
@akoeplinger I think we should |
|
/backport to release/6.0 |
|
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/2835143319 |
|
@akoeplinger backporting to release/6.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: [mono][jit] Don't memset memory in increments lower than word size
Using index info to reconstruct a base tree...
M src/mono/System.Private.CoreLib/src/System/String.Mono.cs
Falling back to patching base and 3-way merge...
Auto-merging src/mono/System.Private.CoreLib/src/System/String.Mono.cs
CONFLICT (content): Merge conflict in src/mono/System.Private.CoreLib/src/System/String.Mono.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 [mono][jit] Don't memset memory in increments lower than word size
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
@BrzVlad please backport manually |
…otnet#73480) If we memset a vt containing references, then, in order for preemptive GC and concurrent GC to work, writing to reference slots must happen atomically, otherwise GC might encounter a garbage ref. Also speeds up memset by about 15% for smaller valuetypes hitting this path on 64bit. More for extra large valuetypes.
…73480) (#74351) If we memset a vt containing references, then, in order for preemptive GC and concurrent GC to work, writing to reference slots must happen atomically, otherwise GC might encounter a garbage ref. Also speeds up memset by about 15% for smaller valuetypes hitting this path on 64bit. More for extra large valuetypes.
If we memset a vt containing references, then, in order for preemptive GC and concurrent GC to work, writing to reference slots must happen atomically, otherwise GC might encounter a garbage ref.
Also speeds up memset by about 15% for smaller valuetypes hitting this path on 64bit. More for extra large valuetypes.
Fixes #58828