From c1599658cf81a91fefc6ecd4c14c6def82780d2d Mon Sep 17 00:00:00 2001 From: routersys Date: Fri, 2 Oct 2026 20:31:54 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A0=B1=E5=91=8A=E3=81=AE=E4=BE=8B=E5=A4=96?= =?UTF-8?q?=E3=81=AB=E5=91=BC=E3=81=B3=E5=87=BA=E3=81=97=E5=85=83=E3=81=AE?= =?UTF-8?q?=E3=82=B9=E3=82=BF=E3=83=83=E3=82=AF=E3=82=92=E4=BB=98=E3=81=91?= =?UTF-8?q?=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92=E9=99=A4=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ComputeGuard.Tests/ComputeGuardianJudgementTests.cs | 13 ------------- ComputeGuard/ComputeGuardian.cs | 5 +---- tools/mutations.json | 6 ------ 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/ComputeGuard.Tests/ComputeGuardianJudgementTests.cs b/ComputeGuard.Tests/ComputeGuardianJudgementTests.cs index 358ed30..2b220cb 100644 --- a/ComputeGuard.Tests/ComputeGuardianJudgementTests.cs +++ b/ComputeGuard.Tests/ComputeGuardianJudgementTests.cs @@ -163,19 +163,6 @@ public sealed class ComputeGuardianJudgementTests Assert.Equal(new ComputeDecision(ComputeRoute.Gpu, ComputeRouteReason.Trusted), decision); } - [Fact] - public void TheReportCarriesTheStackOfTheCaller() - { - var (guardian, reports) = CreateTrustedGuardian(); - - guardian.Judge(Device(), Workload, [FirstFailingCheck]); - - var report = Assert.Single(reports); - Assert.NotNull(report.StackTrace); - Assert.Contains(nameof(ComputeGuardian.Judge), report.StackTrace); - Assert.Contains(nameof(TheReportCarriesTheStackOfTheCaller), report.StackTrace); - } - [Fact] public void APassingJudgementAllocatesNothing() { diff --git a/ComputeGuard/ComputeGuardian.cs b/ComputeGuard/ComputeGuardian.cs index 715984d..fe7316b 100644 --- a/ComputeGuard/ComputeGuardian.cs +++ b/ComputeGuard/ComputeGuardian.cs @@ -1,5 +1,4 @@ using System.Collections.Concurrent; -using System.Runtime.ExceptionServices; namespace ComputeGuard; @@ -132,9 +131,7 @@ internal sealed class ComputeGuardian return; } - var anomaly = new ComputeAnomalyException(new ComputeAnomaly(device, workload, failure, check), exception); - ExceptionDispatchInfo.SetCurrentStackTrace(anomaly); - report(anomaly); + report(new ComputeAnomalyException(new ComputeAnomaly(device, workload, failure, check), exception)); } private sealed class HealthCell diff --git a/tools/mutations.json b/tools/mutations.json index 11c9264..9d0e73c 100644 --- a/tools/mutations.json +++ b/tools/mutations.json @@ -359,12 +359,6 @@ "find": " || failure == ComputeFailure.ResourceExhausted", "replace": "" }, - { - "name": "呼び出し元のスタックを付けない", - "file": "ComputeGuard/ComputeGuardian.cs", - "find": "ExceptionDispatchInfo.SetCurrentStackTrace(anomaly);", - "replace": "" - }, { "name": "固定の判定を逆にする", "file": "ComputeGuard/ComputeGuardian.cs",