File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ jit_alloc(size_t size)
59
59
#elif defined(__APPLE__ )
60
60
int flags = MAP_ANONYMOUS | MAP_PRIVATE ;
61
61
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 ) {
63
64
flags |= MAP_JIT ;
64
65
prot |= PROT_EXEC ;
65
66
}
@@ -117,7 +118,8 @@ mark_executable(unsigned char *memory, size_t size)
117
118
#elif defined(__APPLE__ )
118
119
int failed = 0 ;
119
120
__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 ) {
121
123
pthread_jit_write_protect_np (1 );
122
124
} else {
123
125
failed = mprotect (memory , size , PROT_EXEC | PROT_READ );
You can’t perform that action at this time.
0 commit comments