未验证 提交 927b1c54 编写于 作者: S Steve MacLean 提交者: GitHub

Rely on initial pthread_jit_write_protect_np state (#51135)

上级 91c16faf
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册