From 3449fbdff62176510c6555356aebf23422e54307 Mon Sep 17 00:00:00 2001 From: Koundinya Veluri Date: Mon, 10 Apr 2017 13:00:48 -0700 Subject: [PATCH] Fix contract to allow call into GarbageCollect() to throw (dotnet/coreclr#10856) I did not intend to mark this function as NOTHROW, and there is no reason to expect NOTHROW here. Other functions that call into GarbageCollect() allow THROWS. Commit migrated from https://github.com/dotnet/coreclr/commit/ee4ed1ac502f037e9894006ecc8da63f97325694 --- src/coreclr/src/vm/threads.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/src/vm/threads.cpp b/src/coreclr/src/vm/threads.cpp index 50e95e4..9af5aa4 100644 --- a/src/coreclr/src/vm/threads.cpp +++ b/src/coreclr/src/vm/threads.cpp @@ -6077,7 +6077,7 @@ bool ThreadStore::ShouldTriggerGCForDeadThreads() void ThreadStore::TriggerGCForDeadThreadsIfNecessary() { CONTRACTL { - NOTHROW; + THROWS; GC_TRIGGERS; } CONTRACTL_END; -- 2.7.4