Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve MacLean <Steve.MacLean@microsoft.com>2021-04-13 03:57:00 +0300
committerGitHub <noreply@github.com>2021-04-13 03:57:00 +0300
commit927b1c54956ddb031a2e1a3eddb94ccc16004c27 (patch)
treef91f62f327f1289b2f205bb2dbd9b69a68fca238 /src/coreclr/pal
parent91c16faf35485282a16f5eed9d7095888eb2c85a (diff)
Rely on initial pthread_jit_write_protect_np state (#51135)
Diffstat (limited to 'src/coreclr/pal')
-rw-r--r--src/coreclr/pal/src/map/virtual.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coreclr/pal/src/map/virtual.cpp b/src/coreclr/pal/src/map/virtual.cpp
index 456254bdbbb..cea55e86e25 100644
--- a/src/coreclr/pal/src/map/virtual.cpp
+++ b/src/coreclr/pal/src/map/virtual.cpp
@@ -1765,8 +1765,8 @@ bool
PAL_JITWriteEnableHolder::JITWriteEnable(bool writeEnable)
{
// Use a thread local to track per thread JIT Write enable state
- // Initialize threads to start with MAP_JIT pages readable and executable (R-X) by default.
- thread_local bool enabled = (pthread_jit_write_protect_np(1), false);
+ // Per Apple, new threads start with MAP_JIT pages readable and executable (R-X) by default.
+ thread_local bool enabled = false;
bool result = enabled;
if (enabled != writeEnable)
{