Author: Edd Barrett <vex...@gmail.com> Branch: asmmemmgr-for-code-only Changeset: r86839:5e719144f315 Date: 2016-09-02 16:13 +0100 http://bitbucket.org/pypy/pypy/changeset/5e719144f315/
Log: Another W^X site. diff --git a/rpython/rlib/clibffi.py b/rpython/rlib/clibffi.py --- a/rpython/rlib/clibffi.py +++ b/rpython/rlib/clibffi.py @@ -8,7 +8,7 @@ from rpython.rlib.unroll import unrolling_iterable from rpython.rlib.rarithmetic import intmask, is_emulated_long from rpython.rlib.objectmodel import we_are_translated -from rpython.rlib.rmmap import alloc +from rpython.rlib.rmmap import alloc, set_pages_executable, set_pages_writable from rpython.rlib.rdynload import dlopen, dlclose, dlsym, dlsym_byordinal from rpython.rlib.rdynload import DLOpenError, DLLHANDLE from rpython.rlib import jit, rposix @@ -446,10 +446,13 @@ def _more(self): chunk = rffi.cast(CLOSURES, alloc(CHUNK)) count = CHUNK//rffi.sizeof(FFI_CLOSUREP.TO) + chunk_p = rffi.cast(rffi.CCHARP, chunk) + set_pages_writable(chunk_p, CHUNK) for i in range(count): rffi.cast(rffi.VOIDPP, chunk)[0] = self.free_list self.free_list = rffi.cast(rffi.VOIDP, chunk) chunk = rffi.ptradd(chunk, 1) + set_pages_executable(chunk_p, CHUNK) def alloc(self): if not self.free_list: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit