Skip to content

Commit 901fd65

Browse files
Quickernmangod9
andauthored
Read EnableWriteXorExecute from runtimeConfig (#101490)
* Read System.Runtime.EnableWriteXorExecute from config. * Fixed default value for W^X enabling option. * Revert "Fixed default value for W^X enabling option." This reverts commit b6857a1. --------- Co-authored-by: Manish Godse <61718172+mangod9@users.noreply.github.com>
1 parent 5c8bb40 commit 901fd65

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/coreclr/utilcode/executableallocator.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "pedecoder.h"
55
#include "executableallocator.h"
6+
#include <configuration.h>
67

78
#if USE_LAZY_PREFERRED_RANGE
89
// Preferred region to allocate the code in.
@@ -260,7 +261,7 @@ HRESULT ExecutableAllocator::StaticInitialize(FatalErrorHandler fatalErrorHandle
260261
#endif
261262

262263
g_fatalErrorHandler = fatalErrorHandler;
263-
g_isWXorXEnabled = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableWriteXorExecute) != 0;
264+
g_isWXorXEnabled = Configuration::GetKnobBooleanValue(W("System.Runtime.EnableWriteXorExecute"), CLRConfig::EXTERNAL_EnableWriteXorExecute);
264265
g_instance = new (nothrow) ExecutableAllocator();
265266
if (g_instance == NULL)
266267
{

0 commit comments

Comments
 (0)