Skip to content

Commit 0b7fce8

Browse files
committed
Always enable pthread
1 parent 4bd1c70 commit 0b7fce8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Python/jit.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ jit_alloc(size_t size)
5959
#elif defined(__APPLE__)
6060
int flags = MAP_ANONYMOUS | MAP_PRIVATE;
6161
int prot = PROT_READ | PROT_WRITE;
62-
if (pthread_jit_write_protect_supported_np()) {
62+
//if (pthread_jit_write_protect_supported_np()) {
63+
if (1) {
6364
flags |= MAP_JIT;
6465
prot |= PROT_EXEC;
6566
}
@@ -117,7 +118,8 @@ mark_executable(unsigned char *memory, size_t size)
117118
#elif defined(__APPLE__)
118119
int failed = 0;
119120
__builtin___clear_cache((char *)memory, (char *)memory + size);
120-
if (pthread_jit_write_protect_supported_np()) {
121+
//if (pthread_jit_write_protect_supported_np()) {
122+
if (1) {
121123
pthread_jit_write_protect_np(1);
122124
} else {
123125
failed = mprotect(memory, size, PROT_EXEC | PROT_READ);

0 commit comments

Comments
 (0)