[RISC-V] Fix context restoration as #101709 describes - #101865

Merged
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709
Jun 24, 2024
Merged

[RISC-V] Fix context restoration as #101709 describes#101865
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709

Conversation

@t-mustafin

Copy link
Copy Markdown
Contributor

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

cc @jakobbotsch cc @dotnet/samsung

@ghostghost added the area-PAL-coreclr only for closed issues label May 3, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 3, 2024
@t-mustafint-mustafin changed the title [RISCV-V] Fix context restoration as #101709 describes[RISC-V] Fix context restoration as #101709 describesMay 3, 2024
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

Link to original discussion #101709.

@janvorli

Copy link
Copy Markdown
Member

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

The t4 could get a random value in case of the race and in case the stack would overwrite the context. Would there be a way to do something along the lines I did for arm (32 bit) in my PR - storing the t4 value below the SP that we are restoring to, restoring the SP to the location of the stored t4 and popping it off the stack? That would keep it safe. I am not familiar with the RISC-V instruction set though, so maybe it cannot be done there. And in case the ABI supports red zone, it would need to be done slightly differently to not to corrupt it.

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from c4ec523 to 1e6b313CompareMay 14, 2024 00:04
@t-mustafin
t-mustafin marked this pull request as ready for review May 14, 2024 00:04
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Thanks for detailed explanation! In the recent commit fp register used as temporary to hold stack address value. According to _CONTEXT struct declaration for riscv64 it has 16-byte alignment and odd number of registers inside => there should be one register padding in the end of the struct.

Regarding red zone, I did not find reliable information for riscv64. gcc --help shows red zone ABI is supported on x64 via -mred-zone option, but for arm, arm64 and riscv64 there is no information. @clamp03 do you know if riscv64 supports red zone ABI?

@t-mustafin

t-mustafin commented May 14, 2024

Copy link
Copy Markdown
ContributorAuthor

Volume 1, Unprivileged Specification version 20240411 on https://riscv.org/technical/specifications/ does not know anything about red zone or redzone so I think riscv64 does not support it.

@clamp03

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 16, 2024
@tomeksowi

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@t-mustafin is right, there is no red zone on RISC-V. This wording was added to our ABI to clarify it:

Procedures must not rely upon the persistence of stack-allocated data whose addresses lie below the stack pointer.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2717 / 2722 (99.82%)

details

GIT: 1e6b313

=======================
passed: 2717
failed: 3
skipped: 16
killed: 2
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 51min 39s 652ms
=======================
failed tests
[44.550s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[30.170s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[297.460s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.587s] profiler.eventpipe.reverse_startup.reverse_startup.sh
[1807.749s] readytorun.tests.mainv2.mainv2.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2722 (99.93%)

details

GIT: 1e6b313

=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 208ms
=======================
failed tests
[420.280s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[716.850s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9401 (99.95%)

details

GIT: 1e6b313

=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 18min 51s 526ms
=======================
failed tests
[51.070s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[46.080s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[386.000s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[724.060s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.781s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9401 (99.98%)

details

GIT: 1e6b313

=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 51min 14s 554ms
=======================
failed tests
[436.680s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[705.660s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9402 (99.97%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9399
failed: 3
skipped: 42
killed: 0
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 2h 50min 25s 253ms
=======================
failed tests
[436.020s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[708.380s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
[65.450s] Regressions.coreclr.GitHub_45929.test45929.test45929.sh
[exitcode-139]: SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9397 / 9402 (99.95%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9397
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 1h 17min 41s 59ms
=======================
failed tests
[47.830s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[37.450s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[404.180s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[729.560s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1801.357s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9400 / 9404 (99.96%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//qemu-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9400
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 1h 18min 16s 885ms
=======================
failed tests
[50.770s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[41.040s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[739.300s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.069s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@gbalykov

Copy link
Copy Markdown
Member

@janvorli can you please take a look?

ld t1, (CONTEXT_Pc)(t4) // Since we cannot control $pc directly, we're going to corrupt t1
ld t4, (CONTEXT_T4)(t4)
ld sp, (CONTEXT_Sp)(t4)
ld t4, -8(sp)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I read this correctly, but this seems to still have an issue. It seems that if an async signal occurs after we load the sp, but before we load t4 from (sp-8), the t4 value could be corrupted by the stack of the async signal handler.
We would need to load the sp with an address that is 8 bytes below the target SP, then load the t4 from there, then increment sp by 8 and finally jump to t1. I have attempted to write that in RISC-V code below, please take it with a grain of salt as this is my first RISC-V code ever.

ld t4, (CONTEXT_Sp)(t4)
addi sp, t4, -8
ld t4, (sp)
addi sp, sp, 8
jr t1

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems your solution should work undependable to fields of context structure.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked (Checked build): 9403 / 9404 (99.99%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//starfive-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9403
failed: 1
skipped: 42
killed: 0
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 2h 51min 36s 164ms
=======================
failed tests
[708.590s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from 1e6b313 to 3599429CompareJune 24, 2024 16:07

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9404 / 9408 (99.96%)

details

GIT: 3599429
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz
  3. coreclr/prio1 tests binary
  4. clr+libs+host binary
  5. testhost binary

=======================
passed: 9404
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9450
TOTAL tests: 9450
REAL time: 1h 18min 43s 744ms
=======================
failed tests
[50.180s] profiler.unittest.releaseondetach.releaseondetach
releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[40.180s] JIT.Directed.debugging.debuginfo.tester.tester
tester.sh
[exitcode- -1]: unknown error
[747.220s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism
coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.210s] profiler.eventpipe.reverse_startup.reverse_startup
reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback
InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach
PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks
Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror
eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix
vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest
RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile
arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4
arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1
arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2
arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering
ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa
MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d
seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r
seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos
arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646
b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852
b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746
b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391
b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423
b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606
Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323
b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00
mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic
BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test
Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress
DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize
reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration
getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect
collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest
finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168
536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219
Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc
foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation
lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010
271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown
foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono
runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil
nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent
istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer
CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester
stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests
StackTracePreserveTests.sh

Full report on gist

@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Should the original fix #101709 be picked in release/8.0 branch? I am wonder it included to 9.0.0 milestone instead of 8.0.x. Release/8.0 asm files has same order of stack pointer restoration so it may have same issue too.

@t-mustafin
t-mustafin deleted the riscv_context_restore_101709 branch June 25, 2024 10:23

@gbalykovgbalykov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jul 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-PAL-coreclronly for closed issuescommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@t-mustafin@janvorli@clamp03@tomeksowi@risc-vv@gbalykov
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

[RISC-V] Fix context restoration as #101709 describes - #101865

Merged
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709
Jun 24, 2024
Merged

[RISC-V] Fix context restoration as #101709 describes#101865
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709

Conversation

@t-mustafin

Copy link
Copy Markdown
Contributor

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

cc @jakobbotsch cc @dotnet/samsung

@ghostghost added the area-PAL-coreclr only for closed issues label May 3, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 3, 2024
@t-mustafint-mustafin changed the title [RISCV-V] Fix context restoration as #101709 describes[RISC-V] Fix context restoration as #101709 describesMay 3, 2024
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

Link to original discussion #101709.

@janvorli

Copy link
Copy Markdown
Member

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

The t4 could get a random value in case of the race and in case the stack would overwrite the context. Would there be a way to do something along the lines I did for arm (32 bit) in my PR - storing the t4 value below the SP that we are restoring to, restoring the SP to the location of the stored t4 and popping it off the stack? That would keep it safe. I am not familiar with the RISC-V instruction set though, so maybe it cannot be done there. And in case the ABI supports red zone, it would need to be done slightly differently to not to corrupt it.

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from c4ec523 to 1e6b313CompareMay 14, 2024 00:04
@t-mustafin
t-mustafin marked this pull request as ready for review May 14, 2024 00:04
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Thanks for detailed explanation! In the recent commit fp register used as temporary to hold stack address value. According to _CONTEXT struct declaration for riscv64 it has 16-byte alignment and odd number of registers inside => there should be one register padding in the end of the struct.

Regarding red zone, I did not find reliable information for riscv64. gcc --help shows red zone ABI is supported on x64 via -mred-zone option, but for arm, arm64 and riscv64 there is no information. @clamp03 do you know if riscv64 supports red zone ABI?

@t-mustafin

t-mustafin commented May 14, 2024

Copy link
Copy Markdown
ContributorAuthor

Volume 1, Unprivileged Specification version 20240411 on https://riscv.org/technical/specifications/ does not know anything about red zone or redzone so I think riscv64 does not support it.

@clamp03

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 16, 2024
@tomeksowi

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@t-mustafin is right, there is no red zone on RISC-V. This wording was added to our ABI to clarify it:

Procedures must not rely upon the persistence of stack-allocated data whose addresses lie below the stack pointer.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2717 / 2722 (99.82%)

details

GIT: 1e6b313

=======================
passed: 2717
failed: 3
skipped: 16
killed: 2
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 51min 39s 652ms
=======================
failed tests
[44.550s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[30.170s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[297.460s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.587s] profiler.eventpipe.reverse_startup.reverse_startup.sh
[1807.749s] readytorun.tests.mainv2.mainv2.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2722 (99.93%)

details

GIT: 1e6b313

=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 208ms
=======================
failed tests
[420.280s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[716.850s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9401 (99.95%)

details

GIT: 1e6b313

=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 18min 51s 526ms
=======================
failed tests
[51.070s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[46.080s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[386.000s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[724.060s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.781s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9401 (99.98%)

details

GIT: 1e6b313

=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 51min 14s 554ms
=======================
failed tests
[436.680s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[705.660s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9402 (99.97%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9399
failed: 3
skipped: 42
killed: 0
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 2h 50min 25s 253ms
=======================
failed tests
[436.020s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[708.380s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
[65.450s] Regressions.coreclr.GitHub_45929.test45929.test45929.sh
[exitcode-139]: SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9397 / 9402 (99.95%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9397
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 1h 17min 41s 59ms
=======================
failed tests
[47.830s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[37.450s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[404.180s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[729.560s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1801.357s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9400 / 9404 (99.96%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//qemu-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9400
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 1h 18min 16s 885ms
=======================
failed tests
[50.770s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[41.040s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[739.300s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.069s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@gbalykov

Copy link
Copy Markdown
Member

@janvorli can you please take a look?

ld t1, (CONTEXT_Pc)(t4) // Since we cannot control $pc directly, we're going to corrupt t1
ld t4, (CONTEXT_T4)(t4)
ld sp, (CONTEXT_Sp)(t4)
ld t4, -8(sp)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I read this correctly, but this seems to still have an issue. It seems that if an async signal occurs after we load the sp, but before we load t4 from (sp-8), the t4 value could be corrupted by the stack of the async signal handler.
We would need to load the sp with an address that is 8 bytes below the target SP, then load the t4 from there, then increment sp by 8 and finally jump to t1. I have attempted to write that in RISC-V code below, please take it with a grain of salt as this is my first RISC-V code ever.

ld t4, (CONTEXT_Sp)(t4)
addi sp, t4, -8
ld t4, (sp)
addi sp, sp, 8
jr t1

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems your solution should work undependable to fields of context structure.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked (Checked build): 9403 / 9404 (99.99%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//starfive-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9403
failed: 1
skipped: 42
killed: 0
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 2h 51min 36s 164ms
=======================
failed tests
[708.590s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from 1e6b313 to 3599429CompareJune 24, 2024 16:07

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9404 / 9408 (99.96%)

details

GIT: 3599429
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz
  3. coreclr/prio1 tests binary
  4. clr+libs+host binary
  5. testhost binary

=======================
passed: 9404
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9450
TOTAL tests: 9450
REAL time: 1h 18min 43s 744ms
=======================
failed tests
[50.180s] profiler.unittest.releaseondetach.releaseondetach
releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[40.180s] JIT.Directed.debugging.debuginfo.tester.tester
tester.sh
[exitcode- -1]: unknown error
[747.220s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism
coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.210s] profiler.eventpipe.reverse_startup.reverse_startup
reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback
InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach
PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks
Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror
eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix
vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest
RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile
arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4
arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1
arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2
arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering
ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa
MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d
seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r
seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos
arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646
b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852
b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746
b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391
b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423
b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606
Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323
b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00
mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic
BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test
Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress
DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize
reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration
getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect
collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest
finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168
536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219
Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc
foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation
lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010
271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown
foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono
runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil
nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent
istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer
CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester
stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests
StackTracePreserveTests.sh

Full report on gist

@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Should the original fix #101709 be picked in release/8.0 branch? I am wonder it included to 9.0.0 milestone instead of 8.0.x. Release/8.0 asm files has same order of stack pointer restoration so it may have same issue too.

@t-mustafin
t-mustafin deleted the riscv_context_restore_101709 branch June 25, 2024 10:23

@gbalykovgbalykov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jul 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-PAL-coreclronly for closed issuescommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@t-mustafin@janvorli@clamp03@tomeksowi@risc-vv@gbalykov
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[RISC-V] Fix context restoration as #101709 describes - #101865

Merged
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709
Jun 24, 2024
Merged

[RISC-V] Fix context restoration as #101709 describes#101865
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709

Conversation

@t-mustafin

Copy link
Copy Markdown
Contributor

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

cc @jakobbotsch cc @dotnet/samsung

@ghostghost added the area-PAL-coreclr only for closed issues label May 3, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 3, 2024
@t-mustafint-mustafin changed the title [RISCV-V] Fix context restoration as #101709 describes[RISC-V] Fix context restoration as #101709 describesMay 3, 2024
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

Link to original discussion #101709.

@janvorli

Copy link
Copy Markdown
Member

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

The t4 could get a random value in case of the race and in case the stack would overwrite the context. Would there be a way to do something along the lines I did for arm (32 bit) in my PR - storing the t4 value below the SP that we are restoring to, restoring the SP to the location of the stored t4 and popping it off the stack? That would keep it safe. I am not familiar with the RISC-V instruction set though, so maybe it cannot be done there. And in case the ABI supports red zone, it would need to be done slightly differently to not to corrupt it.

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from c4ec523 to 1e6b313CompareMay 14, 2024 00:04
@t-mustafin
t-mustafin marked this pull request as ready for review May 14, 2024 00:04
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Thanks for detailed explanation! In the recent commit fp register used as temporary to hold stack address value. According to _CONTEXT struct declaration for riscv64 it has 16-byte alignment and odd number of registers inside => there should be one register padding in the end of the struct.

Regarding red zone, I did not find reliable information for riscv64. gcc --help shows red zone ABI is supported on x64 via -mred-zone option, but for arm, arm64 and riscv64 there is no information. @clamp03 do you know if riscv64 supports red zone ABI?

@t-mustafin

t-mustafin commented May 14, 2024

Copy link
Copy Markdown
ContributorAuthor

Volume 1, Unprivileged Specification version 20240411 on https://riscv.org/technical/specifications/ does not know anything about red zone or redzone so I think riscv64 does not support it.

@clamp03

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 16, 2024
@tomeksowi

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@t-mustafin is right, there is no red zone on RISC-V. This wording was added to our ABI to clarify it:

Procedures must not rely upon the persistence of stack-allocated data whose addresses lie below the stack pointer.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2717 / 2722 (99.82%)

details

GIT: 1e6b313

=======================
passed: 2717
failed: 3
skipped: 16
killed: 2
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 51min 39s 652ms
=======================
failed tests
[44.550s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[30.170s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[297.460s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.587s] profiler.eventpipe.reverse_startup.reverse_startup.sh
[1807.749s] readytorun.tests.mainv2.mainv2.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2722 (99.93%)

details

GIT: 1e6b313

=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 208ms
=======================
failed tests
[420.280s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[716.850s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9401 (99.95%)

details

GIT: 1e6b313

=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 18min 51s 526ms
=======================
failed tests
[51.070s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[46.080s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[386.000s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[724.060s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.781s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9401 (99.98%)

details

GIT: 1e6b313

=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 51min 14s 554ms
=======================
failed tests
[436.680s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[705.660s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9402 (99.97%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9399
failed: 3
skipped: 42
killed: 0
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 2h 50min 25s 253ms
=======================
failed tests
[436.020s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[708.380s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
[65.450s] Regressions.coreclr.GitHub_45929.test45929.test45929.sh
[exitcode-139]: SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9397 / 9402 (99.95%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9397
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 1h 17min 41s 59ms
=======================
failed tests
[47.830s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[37.450s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[404.180s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[729.560s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1801.357s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9400 / 9404 (99.96%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//qemu-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9400
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 1h 18min 16s 885ms
=======================
failed tests
[50.770s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[41.040s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[739.300s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.069s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@gbalykov

Copy link
Copy Markdown
Member

@janvorli can you please take a look?

ld t1, (CONTEXT_Pc)(t4) // Since we cannot control $pc directly, we're going to corrupt t1
ld t4, (CONTEXT_T4)(t4)
ld sp, (CONTEXT_Sp)(t4)
ld t4, -8(sp)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I read this correctly, but this seems to still have an issue. It seems that if an async signal occurs after we load the sp, but before we load t4 from (sp-8), the t4 value could be corrupted by the stack of the async signal handler.
We would need to load the sp with an address that is 8 bytes below the target SP, then load the t4 from there, then increment sp by 8 and finally jump to t1. I have attempted to write that in RISC-V code below, please take it with a grain of salt as this is my first RISC-V code ever.

ld t4, (CONTEXT_Sp)(t4)
addi sp, t4, -8
ld t4, (sp)
addi sp, sp, 8
jr t1

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems your solution should work undependable to fields of context structure.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked (Checked build): 9403 / 9404 (99.99%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//starfive-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9403
failed: 1
skipped: 42
killed: 0
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 2h 51min 36s 164ms
=======================
failed tests
[708.590s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from 1e6b313 to 3599429CompareJune 24, 2024 16:07

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9404 / 9408 (99.96%)

details

GIT: 3599429
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz
  3. coreclr/prio1 tests binary
  4. clr+libs+host binary
  5. testhost binary

=======================
passed: 9404
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9450
TOTAL tests: 9450
REAL time: 1h 18min 43s 744ms
=======================
failed tests
[50.180s] profiler.unittest.releaseondetach.releaseondetach
releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[40.180s] JIT.Directed.debugging.debuginfo.tester.tester
tester.sh
[exitcode- -1]: unknown error
[747.220s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism
coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.210s] profiler.eventpipe.reverse_startup.reverse_startup
reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback
InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach
PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks
Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror
eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix
vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest
RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile
arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4
arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1
arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2
arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering
ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa
MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d
seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r
seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos
arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646
b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852
b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746
b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391
b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423
b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606
Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323
b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00
mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic
BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test
Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress
DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize
reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration
getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect
collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest
finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168
536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219
Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc
foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation
lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010
271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown
foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono
runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil
nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent
istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer
CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester
stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests
StackTracePreserveTests.sh

Full report on gist

@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Should the original fix #101709 be picked in release/8.0 branch? I am wonder it included to 9.0.0 milestone instead of 8.0.x. Release/8.0 asm files has same order of stack pointer restoration so it may have same issue too.

@t-mustafin
t-mustafin deleted the riscv_context_restore_101709 branch June 25, 2024 10:23

@gbalykovgbalykov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jul 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-PAL-coreclronly for closed issuescommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@t-mustafin@janvorli@clamp03@tomeksowi@risc-vv@gbalykov
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[RISC-V] Fix context restoration as #101709 describes - #101865

Merged
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709
Jun 24, 2024
Merged

[RISC-V] Fix context restoration as #101709 describes#101865
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709

Conversation

@t-mustafin

Copy link
Copy Markdown
Contributor

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

cc @jakobbotsch cc @dotnet/samsung

@ghostghost added the area-PAL-coreclr only for closed issues label May 3, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 3, 2024
@t-mustafint-mustafin changed the title [RISCV-V] Fix context restoration as #101709 describes[RISC-V] Fix context restoration as #101709 describesMay 3, 2024
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

Link to original discussion #101709.

@janvorli

Copy link
Copy Markdown
Member

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

The t4 could get a random value in case of the race and in case the stack would overwrite the context. Would there be a way to do something along the lines I did for arm (32 bit) in my PR - storing the t4 value below the SP that we are restoring to, restoring the SP to the location of the stored t4 and popping it off the stack? That would keep it safe. I am not familiar with the RISC-V instruction set though, so maybe it cannot be done there. And in case the ABI supports red zone, it would need to be done slightly differently to not to corrupt it.

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from c4ec523 to 1e6b313CompareMay 14, 2024 00:04
@t-mustafin
t-mustafin marked this pull request as ready for review May 14, 2024 00:04
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Thanks for detailed explanation! In the recent commit fp register used as temporary to hold stack address value. According to _CONTEXT struct declaration for riscv64 it has 16-byte alignment and odd number of registers inside => there should be one register padding in the end of the struct.

Regarding red zone, I did not find reliable information for riscv64. gcc --help shows red zone ABI is supported on x64 via -mred-zone option, but for arm, arm64 and riscv64 there is no information. @clamp03 do you know if riscv64 supports red zone ABI?

@t-mustafin

t-mustafin commented May 14, 2024

Copy link
Copy Markdown
ContributorAuthor

Volume 1, Unprivileged Specification version 20240411 on https://riscv.org/technical/specifications/ does not know anything about red zone or redzone so I think riscv64 does not support it.

@clamp03

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 16, 2024
@tomeksowi

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@t-mustafin is right, there is no red zone on RISC-V. This wording was added to our ABI to clarify it:

Procedures must not rely upon the persistence of stack-allocated data whose addresses lie below the stack pointer.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2717 / 2722 (99.82%)

details

GIT: 1e6b313

=======================
passed: 2717
failed: 3
skipped: 16
killed: 2
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 51min 39s 652ms
=======================
failed tests
[44.550s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[30.170s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[297.460s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.587s] profiler.eventpipe.reverse_startup.reverse_startup.sh
[1807.749s] readytorun.tests.mainv2.mainv2.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2722 (99.93%)

details

GIT: 1e6b313

=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 208ms
=======================
failed tests
[420.280s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[716.850s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9401 (99.95%)

details

GIT: 1e6b313

=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 18min 51s 526ms
=======================
failed tests
[51.070s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[46.080s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[386.000s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[724.060s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.781s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9401 (99.98%)

details

GIT: 1e6b313

=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 51min 14s 554ms
=======================
failed tests
[436.680s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[705.660s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9402 (99.97%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9399
failed: 3
skipped: 42
killed: 0
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 2h 50min 25s 253ms
=======================
failed tests
[436.020s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[708.380s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
[65.450s] Regressions.coreclr.GitHub_45929.test45929.test45929.sh
[exitcode-139]: SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9397 / 9402 (99.95%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9397
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 1h 17min 41s 59ms
=======================
failed tests
[47.830s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[37.450s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[404.180s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[729.560s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1801.357s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9400 / 9404 (99.96%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//qemu-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9400
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 1h 18min 16s 885ms
=======================
failed tests
[50.770s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[41.040s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[739.300s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.069s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@gbalykov

Copy link
Copy Markdown
Member

@janvorli can you please take a look?

ld t1, (CONTEXT_Pc)(t4) // Since we cannot control $pc directly, we're going to corrupt t1
ld t4, (CONTEXT_T4)(t4)
ld sp, (CONTEXT_Sp)(t4)
ld t4, -8(sp)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I read this correctly, but this seems to still have an issue. It seems that if an async signal occurs after we load the sp, but before we load t4 from (sp-8), the t4 value could be corrupted by the stack of the async signal handler.
We would need to load the sp with an address that is 8 bytes below the target SP, then load the t4 from there, then increment sp by 8 and finally jump to t1. I have attempted to write that in RISC-V code below, please take it with a grain of salt as this is my first RISC-V code ever.

ld t4, (CONTEXT_Sp)(t4)
addi sp, t4, -8
ld t4, (sp)
addi sp, sp, 8
jr t1

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems your solution should work undependable to fields of context structure.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked (Checked build): 9403 / 9404 (99.99%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//starfive-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9403
failed: 1
skipped: 42
killed: 0
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 2h 51min 36s 164ms
=======================
failed tests
[708.590s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from 1e6b313 to 3599429CompareJune 24, 2024 16:07

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9404 / 9408 (99.96%)

details

GIT: 3599429
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz
  3. coreclr/prio1 tests binary
  4. clr+libs+host binary
  5. testhost binary

=======================
passed: 9404
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9450
TOTAL tests: 9450
REAL time: 1h 18min 43s 744ms
=======================
failed tests
[50.180s] profiler.unittest.releaseondetach.releaseondetach
releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[40.180s] JIT.Directed.debugging.debuginfo.tester.tester
tester.sh
[exitcode- -1]: unknown error
[747.220s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism
coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.210s] profiler.eventpipe.reverse_startup.reverse_startup
reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback
InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach
PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks
Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror
eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix
vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest
RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile
arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4
arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1
arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2
arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering
ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa
MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d
seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r
seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos
arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646
b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852
b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746
b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391
b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423
b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606
Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323
b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00
mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic
BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test
Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress
DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize
reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration
getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect
collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest
finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168
536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219
Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc
foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation
lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010
271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown
foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono
runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil
nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent
istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer
CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester
stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests
StackTracePreserveTests.sh

Full report on gist

@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Should the original fix #101709 be picked in release/8.0 branch? I am wonder it included to 9.0.0 milestone instead of 8.0.x. Release/8.0 asm files has same order of stack pointer restoration so it may have same issue too.

@t-mustafin
t-mustafin deleted the riscv_context_restore_101709 branch June 25, 2024 10:23

@gbalykovgbalykov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jul 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-PAL-coreclronly for closed issuescommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@t-mustafin@janvorli@clamp03@tomeksowi@risc-vv@gbalykov
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

[RISC-V] Fix context restoration as #101709 describes - #101865

Merged
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709
Jun 24, 2024
Merged

[RISC-V] Fix context restoration as #101709 describes#101865
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709

Conversation

@t-mustafin

Copy link
Copy Markdown
Contributor

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

cc @jakobbotsch cc @dotnet/samsung

@ghostghost added the area-PAL-coreclr only for closed issues label May 3, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 3, 2024
@t-mustafint-mustafin changed the title [RISCV-V] Fix context restoration as #101709 describes[RISC-V] Fix context restoration as #101709 describesMay 3, 2024
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

Link to original discussion #101709.

@janvorli

Copy link
Copy Markdown
Member

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

The t4 could get a random value in case of the race and in case the stack would overwrite the context. Would there be a way to do something along the lines I did for arm (32 bit) in my PR - storing the t4 value below the SP that we are restoring to, restoring the SP to the location of the stored t4 and popping it off the stack? That would keep it safe. I am not familiar with the RISC-V instruction set though, so maybe it cannot be done there. And in case the ABI supports red zone, it would need to be done slightly differently to not to corrupt it.

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from c4ec523 to 1e6b313CompareMay 14, 2024 00:04
@t-mustafin
t-mustafin marked this pull request as ready for review May 14, 2024 00:04
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Thanks for detailed explanation! In the recent commit fp register used as temporary to hold stack address value. According to _CONTEXT struct declaration for riscv64 it has 16-byte alignment and odd number of registers inside => there should be one register padding in the end of the struct.

Regarding red zone, I did not find reliable information for riscv64. gcc --help shows red zone ABI is supported on x64 via -mred-zone option, but for arm, arm64 and riscv64 there is no information. @clamp03 do you know if riscv64 supports red zone ABI?

@t-mustafin

t-mustafin commented May 14, 2024

Copy link
Copy Markdown
ContributorAuthor

Volume 1, Unprivileged Specification version 20240411 on https://riscv.org/technical/specifications/ does not know anything about red zone or redzone so I think riscv64 does not support it.

@clamp03

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 16, 2024
@tomeksowi

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@t-mustafin is right, there is no red zone on RISC-V. This wording was added to our ABI to clarify it:

Procedures must not rely upon the persistence of stack-allocated data whose addresses lie below the stack pointer.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2717 / 2722 (99.82%)

details

GIT: 1e6b313

=======================
passed: 2717
failed: 3
skipped: 16
killed: 2
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 51min 39s 652ms
=======================
failed tests
[44.550s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[30.170s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[297.460s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.587s] profiler.eventpipe.reverse_startup.reverse_startup.sh
[1807.749s] readytorun.tests.mainv2.mainv2.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2722 (99.93%)

details

GIT: 1e6b313

=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 208ms
=======================
failed tests
[420.280s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[716.850s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9401 (99.95%)

details

GIT: 1e6b313

=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 18min 51s 526ms
=======================
failed tests
[51.070s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[46.080s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[386.000s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[724.060s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.781s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9401 (99.98%)

details

GIT: 1e6b313

=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 51min 14s 554ms
=======================
failed tests
[436.680s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[705.660s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9402 (99.97%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9399
failed: 3
skipped: 42
killed: 0
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 2h 50min 25s 253ms
=======================
failed tests
[436.020s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[708.380s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
[65.450s] Regressions.coreclr.GitHub_45929.test45929.test45929.sh
[exitcode-139]: SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9397 / 9402 (99.95%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9397
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 1h 17min 41s 59ms
=======================
failed tests
[47.830s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[37.450s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[404.180s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[729.560s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1801.357s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9400 / 9404 (99.96%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//qemu-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9400
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 1h 18min 16s 885ms
=======================
failed tests
[50.770s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[41.040s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[739.300s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.069s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@gbalykov

Copy link
Copy Markdown
Member

@janvorli can you please take a look?

ld t1, (CONTEXT_Pc)(t4) // Since we cannot control $pc directly, we're going to corrupt t1
ld t4, (CONTEXT_T4)(t4)
ld sp, (CONTEXT_Sp)(t4)
ld t4, -8(sp)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I read this correctly, but this seems to still have an issue. It seems that if an async signal occurs after we load the sp, but before we load t4 from (sp-8), the t4 value could be corrupted by the stack of the async signal handler.
We would need to load the sp with an address that is 8 bytes below the target SP, then load the t4 from there, then increment sp by 8 and finally jump to t1. I have attempted to write that in RISC-V code below, please take it with a grain of salt as this is my first RISC-V code ever.

ld t4, (CONTEXT_Sp)(t4)
addi sp, t4, -8
ld t4, (sp)
addi sp, sp, 8
jr t1

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems your solution should work undependable to fields of context structure.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked (Checked build): 9403 / 9404 (99.99%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//starfive-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9403
failed: 1
skipped: 42
killed: 0
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 2h 51min 36s 164ms
=======================
failed tests
[708.590s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from 1e6b313 to 3599429CompareJune 24, 2024 16:07

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9404 / 9408 (99.96%)

details

GIT: 3599429
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz
  3. coreclr/prio1 tests binary
  4. clr+libs+host binary
  5. testhost binary

=======================
passed: 9404
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9450
TOTAL tests: 9450
REAL time: 1h 18min 43s 744ms
=======================
failed tests
[50.180s] profiler.unittest.releaseondetach.releaseondetach
releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[40.180s] JIT.Directed.debugging.debuginfo.tester.tester
tester.sh
[exitcode- -1]: unknown error
[747.220s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism
coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.210s] profiler.eventpipe.reverse_startup.reverse_startup
reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback
InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach
PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks
Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror
eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix
vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest
RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile
arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4
arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1
arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2
arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering
ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa
MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d
seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r
seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos
arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646
b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852
b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746
b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391
b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423
b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606
Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323
b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00
mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic
BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test
Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress
DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize
reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration
getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect
collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest
finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168
536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219
Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc
foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation
lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010
271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown
foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono
runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil
nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent
istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer
CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester
stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests
StackTracePreserveTests.sh

Full report on gist

@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Should the original fix #101709 be picked in release/8.0 branch? I am wonder it included to 9.0.0 milestone instead of 8.0.x. Release/8.0 asm files has same order of stack pointer restoration so it may have same issue too.

@t-mustafin
t-mustafin deleted the riscv_context_restore_101709 branch June 25, 2024 10:23

@gbalykovgbalykov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jul 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-PAL-coreclronly for closed issuescommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@t-mustafin@janvorli@clamp03@tomeksowi@risc-vv@gbalykov
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[RISC-V] Fix context restoration as #101709 describes - #101865

Merged
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709
Jun 24, 2024
Merged

[RISC-V] Fix context restoration as #101709 describes#101865
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709

Conversation

@t-mustafin

Copy link
Copy Markdown
Contributor

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

cc @jakobbotsch cc @dotnet/samsung

@ghostghost added the area-PAL-coreclr only for closed issues label May 3, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 3, 2024
@t-mustafint-mustafin changed the title [RISCV-V] Fix context restoration as #101709 describes[RISC-V] Fix context restoration as #101709 describesMay 3, 2024
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

Link to original discussion #101709.

@janvorli

Copy link
Copy Markdown
Member

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

The t4 could get a random value in case of the race and in case the stack would overwrite the context. Would there be a way to do something along the lines I did for arm (32 bit) in my PR - storing the t4 value below the SP that we are restoring to, restoring the SP to the location of the stored t4 and popping it off the stack? That would keep it safe. I am not familiar with the RISC-V instruction set though, so maybe it cannot be done there. And in case the ABI supports red zone, it would need to be done slightly differently to not to corrupt it.

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from c4ec523 to 1e6b313CompareMay 14, 2024 00:04
@t-mustafin
t-mustafin marked this pull request as ready for review May 14, 2024 00:04
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Thanks for detailed explanation! In the recent commit fp register used as temporary to hold stack address value. According to _CONTEXT struct declaration for riscv64 it has 16-byte alignment and odd number of registers inside => there should be one register padding in the end of the struct.

Regarding red zone, I did not find reliable information for riscv64. gcc --help shows red zone ABI is supported on x64 via -mred-zone option, but for arm, arm64 and riscv64 there is no information. @clamp03 do you know if riscv64 supports red zone ABI?

@t-mustafin

t-mustafin commented May 14, 2024

Copy link
Copy Markdown
ContributorAuthor

Volume 1, Unprivileged Specification version 20240411 on https://riscv.org/technical/specifications/ does not know anything about red zone or redzone so I think riscv64 does not support it.

@clamp03

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 16, 2024
@tomeksowi

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@t-mustafin is right, there is no red zone on RISC-V. This wording was added to our ABI to clarify it:

Procedures must not rely upon the persistence of stack-allocated data whose addresses lie below the stack pointer.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2717 / 2722 (99.82%)

details

GIT: 1e6b313

=======================
passed: 2717
failed: 3
skipped: 16
killed: 2
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 51min 39s 652ms
=======================
failed tests
[44.550s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[30.170s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[297.460s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.587s] profiler.eventpipe.reverse_startup.reverse_startup.sh
[1807.749s] readytorun.tests.mainv2.mainv2.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2722 (99.93%)

details

GIT: 1e6b313

=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 208ms
=======================
failed tests
[420.280s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[716.850s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9401 (99.95%)

details

GIT: 1e6b313

=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 18min 51s 526ms
=======================
failed tests
[51.070s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[46.080s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[386.000s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[724.060s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.781s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9401 (99.98%)

details

GIT: 1e6b313

=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 51min 14s 554ms
=======================
failed tests
[436.680s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[705.660s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9402 (99.97%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9399
failed: 3
skipped: 42
killed: 0
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 2h 50min 25s 253ms
=======================
failed tests
[436.020s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[708.380s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
[65.450s] Regressions.coreclr.GitHub_45929.test45929.test45929.sh
[exitcode-139]: SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9397 / 9402 (99.95%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9397
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 1h 17min 41s 59ms
=======================
failed tests
[47.830s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[37.450s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[404.180s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[729.560s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1801.357s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9400 / 9404 (99.96%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//qemu-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9400
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 1h 18min 16s 885ms
=======================
failed tests
[50.770s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[41.040s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[739.300s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.069s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@gbalykov

Copy link
Copy Markdown
Member

@janvorli can you please take a look?

ld t1, (CONTEXT_Pc)(t4) // Since we cannot control $pc directly, we're going to corrupt t1
ld t4, (CONTEXT_T4)(t4)
ld sp, (CONTEXT_Sp)(t4)
ld t4, -8(sp)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I read this correctly, but this seems to still have an issue. It seems that if an async signal occurs after we load the sp, but before we load t4 from (sp-8), the t4 value could be corrupted by the stack of the async signal handler.
We would need to load the sp with an address that is 8 bytes below the target SP, then load the t4 from there, then increment sp by 8 and finally jump to t1. I have attempted to write that in RISC-V code below, please take it with a grain of salt as this is my first RISC-V code ever.

ld t4, (CONTEXT_Sp)(t4)
addi sp, t4, -8
ld t4, (sp)
addi sp, sp, 8
jr t1

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems your solution should work undependable to fields of context structure.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked (Checked build): 9403 / 9404 (99.99%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//starfive-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9403
failed: 1
skipped: 42
killed: 0
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 2h 51min 36s 164ms
=======================
failed tests
[708.590s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from 1e6b313 to 3599429CompareJune 24, 2024 16:07

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9404 / 9408 (99.96%)

details

GIT: 3599429
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz
  3. coreclr/prio1 tests binary
  4. clr+libs+host binary
  5. testhost binary

=======================
passed: 9404
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9450
TOTAL tests: 9450
REAL time: 1h 18min 43s 744ms
=======================
failed tests
[50.180s] profiler.unittest.releaseondetach.releaseondetach
releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[40.180s] JIT.Directed.debugging.debuginfo.tester.tester
tester.sh
[exitcode- -1]: unknown error
[747.220s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism
coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.210s] profiler.eventpipe.reverse_startup.reverse_startup
reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback
InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach
PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks
Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror
eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix
vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest
RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile
arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4
arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1
arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2
arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering
ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa
MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d
seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r
seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos
arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646
b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852
b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746
b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391
b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423
b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606
Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323
b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00
mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic
BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test
Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress
DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize
reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration
getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect
collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest
finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168
536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219
Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc
foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation
lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010
271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown
foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono
runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil
nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent
istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer
CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester
stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests
StackTracePreserveTests.sh

Full report on gist

@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Should the original fix #101709 be picked in release/8.0 branch? I am wonder it included to 9.0.0 milestone instead of 8.0.x. Release/8.0 asm files has same order of stack pointer restoration so it may have same issue too.

@t-mustafin
t-mustafin deleted the riscv_context_restore_101709 branch June 25, 2024 10:23

@gbalykovgbalykov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jul 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-PAL-coreclronly for closed issuescommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@t-mustafin@janvorli@clamp03@tomeksowi@risc-vv@gbalykov
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[RISC-V] Fix context restoration as #101709 describes - #101865

Merged
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709
Jun 24, 2024
Merged

[RISC-V] Fix context restoration as #101709 describes#101865
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709

Conversation

@t-mustafin

Copy link
Copy Markdown
Contributor

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

cc @jakobbotsch cc @dotnet/samsung

@ghostghost added the area-PAL-coreclr only for closed issues label May 3, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 3, 2024
@t-mustafint-mustafin changed the title [RISCV-V] Fix context restoration as #101709 describes[RISC-V] Fix context restoration as #101709 describesMay 3, 2024
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

Link to original discussion #101709.

@janvorli

Copy link
Copy Markdown
Member

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

The t4 could get a random value in case of the race and in case the stack would overwrite the context. Would there be a way to do something along the lines I did for arm (32 bit) in my PR - storing the t4 value below the SP that we are restoring to, restoring the SP to the location of the stored t4 and popping it off the stack? That would keep it safe. I am not familiar with the RISC-V instruction set though, so maybe it cannot be done there. And in case the ABI supports red zone, it would need to be done slightly differently to not to corrupt it.

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from c4ec523 to 1e6b313CompareMay 14, 2024 00:04
@t-mustafin
t-mustafin marked this pull request as ready for review May 14, 2024 00:04
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Thanks for detailed explanation! In the recent commit fp register used as temporary to hold stack address value. According to _CONTEXT struct declaration for riscv64 it has 16-byte alignment and odd number of registers inside => there should be one register padding in the end of the struct.

Regarding red zone, I did not find reliable information for riscv64. gcc --help shows red zone ABI is supported on x64 via -mred-zone option, but for arm, arm64 and riscv64 there is no information. @clamp03 do you know if riscv64 supports red zone ABI?

@t-mustafin

t-mustafin commented May 14, 2024

Copy link
Copy Markdown
ContributorAuthor

Volume 1, Unprivileged Specification version 20240411 on https://riscv.org/technical/specifications/ does not know anything about red zone or redzone so I think riscv64 does not support it.

@clamp03

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 16, 2024
@tomeksowi

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@t-mustafin is right, there is no red zone on RISC-V. This wording was added to our ABI to clarify it:

Procedures must not rely upon the persistence of stack-allocated data whose addresses lie below the stack pointer.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2717 / 2722 (99.82%)

details

GIT: 1e6b313

=======================
passed: 2717
failed: 3
skipped: 16
killed: 2
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 51min 39s 652ms
=======================
failed tests
[44.550s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[30.170s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[297.460s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.587s] profiler.eventpipe.reverse_startup.reverse_startup.sh
[1807.749s] readytorun.tests.mainv2.mainv2.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2722 (99.93%)

details

GIT: 1e6b313

=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 208ms
=======================
failed tests
[420.280s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[716.850s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9401 (99.95%)

details

GIT: 1e6b313

=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 18min 51s 526ms
=======================
failed tests
[51.070s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[46.080s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[386.000s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[724.060s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.781s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9401 (99.98%)

details

GIT: 1e6b313

=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 51min 14s 554ms
=======================
failed tests
[436.680s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[705.660s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9402 (99.97%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9399
failed: 3
skipped: 42
killed: 0
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 2h 50min 25s 253ms
=======================
failed tests
[436.020s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[708.380s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
[65.450s] Regressions.coreclr.GitHub_45929.test45929.test45929.sh
[exitcode-139]: SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9397 / 9402 (99.95%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9397
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 1h 17min 41s 59ms
=======================
failed tests
[47.830s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[37.450s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[404.180s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[729.560s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1801.357s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9400 / 9404 (99.96%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//qemu-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9400
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 1h 18min 16s 885ms
=======================
failed tests
[50.770s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[41.040s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[739.300s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.069s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@gbalykov

Copy link
Copy Markdown
Member

@janvorli can you please take a look?

ld t1, (CONTEXT_Pc)(t4) // Since we cannot control $pc directly, we're going to corrupt t1
ld t4, (CONTEXT_T4)(t4)
ld sp, (CONTEXT_Sp)(t4)
ld t4, -8(sp)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I read this correctly, but this seems to still have an issue. It seems that if an async signal occurs after we load the sp, but before we load t4 from (sp-8), the t4 value could be corrupted by the stack of the async signal handler.
We would need to load the sp with an address that is 8 bytes below the target SP, then load the t4 from there, then increment sp by 8 and finally jump to t1. I have attempted to write that in RISC-V code below, please take it with a grain of salt as this is my first RISC-V code ever.

ld t4, (CONTEXT_Sp)(t4)
addi sp, t4, -8
ld t4, (sp)
addi sp, sp, 8
jr t1

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems your solution should work undependable to fields of context structure.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked (Checked build): 9403 / 9404 (99.99%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//starfive-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9403
failed: 1
skipped: 42
killed: 0
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 2h 51min 36s 164ms
=======================
failed tests
[708.590s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from 1e6b313 to 3599429CompareJune 24, 2024 16:07

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9404 / 9408 (99.96%)

details

GIT: 3599429
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz
  3. coreclr/prio1 tests binary
  4. clr+libs+host binary
  5. testhost binary

=======================
passed: 9404
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9450
TOTAL tests: 9450
REAL time: 1h 18min 43s 744ms
=======================
failed tests
[50.180s] profiler.unittest.releaseondetach.releaseondetach
releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[40.180s] JIT.Directed.debugging.debuginfo.tester.tester
tester.sh
[exitcode- -1]: unknown error
[747.220s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism
coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.210s] profiler.eventpipe.reverse_startup.reverse_startup
reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback
InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach
PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks
Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror
eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix
vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest
RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile
arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4
arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1
arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2
arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering
ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa
MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d
seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r
seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos
arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646
b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852
b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746
b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391
b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423
b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606
Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323
b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00
mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic
BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test
Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress
DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize
reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration
getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect
collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest
finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168
536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219
Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc
foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation
lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010
271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown
foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono
runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil
nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent
istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer
CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester
stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests
StackTracePreserveTests.sh

Full report on gist

@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Should the original fix #101709 be picked in release/8.0 branch? I am wonder it included to 9.0.0 milestone instead of 8.0.x. Release/8.0 asm files has same order of stack pointer restoration so it may have same issue too.

@t-mustafin
t-mustafin deleted the riscv_context_restore_101709 branch June 25, 2024 10:23

@gbalykovgbalykov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jul 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-PAL-coreclronly for closed issuescommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@t-mustafin@janvorli@clamp03@tomeksowi@risc-vv@gbalykov
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

[RISC-V] Fix context restoration as #101709 describes - #101865

Merged
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709
Jun 24, 2024
Merged

[RISC-V] Fix context restoration as #101709 describes#101865
janvorli merged 2 commits into
dotnet:mainfrom
t-mustafin:riscv_context_restore_101709

Conversation

@t-mustafin

Copy link
Copy Markdown
Contributor

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

cc @jakobbotsch cc @dotnet/samsung

@ghostghost added the area-PAL-coreclr only for closed issues label May 3, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 3, 2024
@t-mustafint-mustafin changed the title [RISCV-V] Fix context restoration as #101709 describes[RISC-V] Fix context restoration as #101709 describesMay 3, 2024
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

Link to original discussion #101709.

@janvorli

Copy link
Copy Markdown
Member

@janvorli Is it proper fix? Seems for race condition case it would trash 2 temporary registers - t1 and t4, so it may be better completely remove t4 restoration ld t4, (CONTEXT_T4)(t4).

The t4 could get a random value in case of the race and in case the stack would overwrite the context. Would there be a way to do something along the lines I did for arm (32 bit) in my PR - storing the t4 value below the SP that we are restoring to, restoring the SP to the location of the stored t4 and popping it off the stack? That would keep it safe. I am not familiar with the RISC-V instruction set though, so maybe it cannot be done there. And in case the ABI supports red zone, it would need to be done slightly differently to not to corrupt it.

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from c4ec523 to 1e6b313CompareMay 14, 2024 00:04
@t-mustafin
t-mustafin marked this pull request as ready for review May 14, 2024 00:04
@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Thanks for detailed explanation! In the recent commit fp register used as temporary to hold stack address value. According to _CONTEXT struct declaration for riscv64 it has 16-byte alignment and odd number of registers inside => there should be one register padding in the end of the struct.

Regarding red zone, I did not find reliable information for riscv64. gcc --help shows red zone ABI is supported on x64 via -mred-zone option, but for arm, arm64 and riscv64 there is no information. @clamp03 do you know if riscv64 supports red zone ABI?

@t-mustafin

t-mustafin commented May 14, 2024

Copy link
Copy Markdown
ContributorAuthor

Volume 1, Unprivileged Specification version 20240411 on https://riscv.org/technical/specifications/ does not know anything about red zone or redzone so I think riscv64 does not support it.

@clamp03

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 16, 2024
@tomeksowi

Copy link
Copy Markdown
Member

Sorry, I don't know either. CC @dotnet/samsung Does anyone know about redzone in riscv?

@t-mustafin is right, there is no red zone on RISC-V. This wording was added to our ABI to clarify it:

Procedures must not rely upon the persistence of stack-allocated data whose addresses lie below the stack pointer.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2717 / 2722 (99.82%)

details

GIT: 1e6b313

=======================
passed: 2717
failed: 3
skipped: 16
killed: 2
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 51min 39s 652ms
=======================
failed tests
[44.550s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[30.170s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[297.460s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.587s] profiler.eventpipe.reverse_startup.reverse_startup.sh
[1807.749s] readytorun.tests.mainv2.mainv2.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2722 (99.93%)

details

GIT: 1e6b313

=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 208ms
=======================
failed tests
[420.280s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[716.850s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9401 (99.95%)

details

GIT: 1e6b313

=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 18min 51s 526ms
=======================
failed tests
[51.070s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[46.080s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[386.000s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[724.060s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.781s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9401 (99.98%)

details

GIT: 1e6b313

=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 51min 14s 554ms
=======================
failed tests
[436.680s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[705.660s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9402 (99.97%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9399
failed: 3
skipped: 42
killed: 0
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 2h 50min 25s 253ms
=======================
failed tests
[436.020s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[708.380s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
[65.450s] Regressions.coreclr.GitHub_45929.test45929.test45929.sh
[exitcode-139]: SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9397 / 9402 (99.95%)

details

GIT: 1e6b313
Details: report.xml

=======================
passed: 9397
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9444
TOTAL tests: 9444
REAL time: 1h 17min 41s 59ms
=======================
failed tests
[47.830s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[37.450s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[404.180s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[729.560s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1801.357s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9400 / 9404 (99.96%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//qemu-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9400
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 1h 18min 16s 885ms
=======================
failed tests
[50.770s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[41.040s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[739.300s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.069s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@gbalykov

Copy link
Copy Markdown
Member

@janvorli can you please take a look?

ld t1, (CONTEXT_Pc)(t4) // Since we cannot control $pc directly, we're going to corrupt t1
ld t4, (CONTEXT_T4)(t4)
ld sp, (CONTEXT_Sp)(t4)
ld t4, -8(sp)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I read this correctly, but this seems to still have an issue. It seems that if an async signal occurs after we load the sp, but before we load t4 from (sp-8), the t4 value could be corrupted by the stack of the async signal handler.
We would need to load the sp with an address that is 8 bytes below the target SP, then load the t4 from there, then increment sp by 8 and finally jump to t1. I have attempted to write that in RISC-V code below, please take it with a grain of salt as this is my first RISC-V code ever.

ld t4, (CONTEXT_Sp)(t4)
addi sp, t4, -8
ld t4, (sp)
addi sp, sp, 8
jr t1

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems your solution should work undependable to fields of context structure.

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked (Checked build): 9403 / 9404 (99.99%)

details

GIT: 1e6b313
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz/pipelines//starfive-prio1-checked/8/run-tests/1/ALL/testoutput/test_datails.Checked.tar.gz
  3. coreclr/prio1 tests binary/pipelines//build-runtime-checked/28/build-tests-prio1/1/build/coreclr.Checked.prio1.tar.gz
  4. clr+libs+host binary/pipelines//build-runtime-checked/28/build-core/1/build/artifacts.Checked.tar.gz
  5. testhost binary/pipelines//build-runtime-checked/28/build-core/1/build/testhost.Checked.tar.gz
=======================
passed: 9403
failed: 1
skipped: 42
killed: 0
------------------------
TOTAL libs: 9446
TOTAL tests: 9446
REAL time: 2h 51min 36s 164ms
=======================
failed tests
[708.590s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@t-mustafin
t-mustafinforce-pushed the riscv_context_restore_101709 branch from 1e6b313 to 3599429CompareJune 24, 2024 16:07

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked (Checked build): 9404 / 9408 (99.96%)

details

GIT: 3599429
Build mode: Checked
Links:

  1. tests_results.xml
  2. tests_output.tar.gz
  3. coreclr/prio1 tests binary
  4. clr+libs+host binary
  5. testhost binary

=======================
passed: 9404
failed: 3
skipped: 42
killed: 1
------------------------
TOTAL libs: 9450
TOTAL tests: 9450
REAL time: 1h 18min 43s 744ms
=======================
failed tests
[50.180s] profiler.unittest.releaseondetach.releaseondetach
releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[40.180s] JIT.Directed.debugging.debuginfo.tester.tester
tester.sh
[exitcode- -1]: unknown error
[747.220s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism
coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.210s] profiler.eventpipe.reverse_startup.reverse_startup
reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback
InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach
PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks
Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror
eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix
vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest
RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile
arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4
arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1
arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2
arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering
ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa
MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d
seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r
seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos
arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646
b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852
b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746
b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391
b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423
b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606
Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323
b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00
mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic
BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test
Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress
DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize
reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration
getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect
collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest
finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168
536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219
Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc
foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation
lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010
271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown
foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono
runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil
nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent
istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer
CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester
stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests
StackTracePreserveTests.sh

Full report on gist

@t-mustafin

Copy link
Copy Markdown
ContributorAuthor

@janvorli Should the original fix #101709 be picked in release/8.0 branch? I am wonder it included to 9.0.0 milestone instead of 8.0.x. Release/8.0 asm files has same order of stack pointer restoration so it may have same issue too.

@t-mustafin
t-mustafin deleted the riscv_context_restore_101709 branch June 25, 2024 10:23

@gbalykovgbalykov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jul 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-PAL-coreclronly for closed issuescommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@t-mustafin@janvorli@clamp03@tomeksowi@risc-vv@gbalykov