Skip to content

Commit b80048e

Browse files
authored
Enable new exception handling by default (#98570)
* Enable new exception handling by default This change just flips the config knob to enable the new exception handling by default. * Add runtime.config setting for enabling the new EH * Reflect PR - switch the config name From the EnableNewExceptionHandling to LegacyExceptionHandling
1 parent bdab216 commit b80048e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/coreclr/inc/clrconfigvalues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_legacyCorruptedStateExceptionsPolicy, W("le
259259
CONFIG_DWORD_INFO(INTERNAL_SuppressLostExceptionTypeAssert, W("SuppressLostExceptionTypeAssert"), 0, "")
260260
RETAIL_CONFIG_DWORD_INFO(INTERNAL_UseEntryPointFilter, W("UseEntryPointFilter"), 0, "")
261261
RETAIL_CONFIG_DWORD_INFO(INTERNAL_Corhost_Swallow_Uncaught_Exceptions, W("Corhost_Swallow_Uncaught_Exceptions"), 0, "")
262-
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableNewExceptionHandling, W("EnableNewExceptionHandling"), 0, "Enable new exception handling.");
262+
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_LegacyExceptionHandling, W("LegacyExceptionHandling"), 0, "Enable legacy exception handling.");
263263

264264

265265
///

src/coreclr/vm/exceptionhandling.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "corinfo.h"
2020
#include "exceptionhandlingqcalls.h"
2121
#include "exinfo.h"
22+
#include "configuration.h"
2223

2324
#if defined(TARGET_X86)
2425
#define USE_CURRENT_CONTEXT_IN_FILTER
@@ -236,7 +237,7 @@ void InitializeExceptionHandling()
236237
// Initialize the lock used for synchronizing access to the stacktrace in the exception object
237238
g_StackTraceArrayLock.Init(LOCK_TYPE_DEFAULT, TRUE);
238239

239-
g_isNewExceptionHandlingEnabled = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableNewExceptionHandling) != 0;
240+
g_isNewExceptionHandlingEnabled = Configuration::GetKnobBooleanValue(W("System.Runtime.LegacyExceptionHandling"), CLRConfig::EXTERNAL_LegacyExceptionHandling ) == 0;
240241

241242
#ifdef TARGET_UNIX
242243
// Register handler of hardware exceptions like null reference in PAL

0 commit comments

Comments
 (0)