Skip to content

Commit

Permalink
Read EnableWriteXorExecute from runtimeConfig (dotnet#101490)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
2 people authored and michaelgsharp committed May 8, 2024
1 parent a012c0c commit 20a0a56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/coreclr/utilcode/executableallocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "pedecoder.h"
#include "executableallocator.h"
#include <configuration.h>

#if USE_LAZY_PREFERRED_RANGE
// Preferred region to allocate the code in.
Expand Down Expand Up @@ -260,7 +261,7 @@ HRESULT ExecutableAllocator::StaticInitialize(FatalErrorHandler fatalErrorHandle
#endif

g_fatalErrorHandler = fatalErrorHandler;
g_isWXorXEnabled = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableWriteXorExecute) != 0;
g_isWXorXEnabled = Configuration::GetKnobBooleanValue(W("System.Runtime.EnableWriteXorExecute"), CLRConfig::EXTERNAL_EnableWriteXorExecute);
g_instance = new (nothrow) ExecutableAllocator();
if (g_instance == NULL)
{
Expand Down

0 comments on commit 20a0a56

Please sign in to comment.